Skip to content

Commit 1de2b8a

Browse files
committed
Don't restrict object search to modules
I'm unsure why this change is here but I could find no equivalent logic in CRuby and this appears to prevent the search detailed in jruby#8924 from succeeding. Removing this restriction fixes that issue. Fixes jruby#8924
1 parent baa8254 commit 1de2b8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/src/main/java/org/jruby/RubyModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4835,7 +4835,7 @@ public IRubyObject getConstantNoConstMissingSKipAutoload(String name) {
48354835
private IRubyObject getConstantSkipAutoload(String name, boolean inherit, boolean searchObject, boolean inheritObject) {
48364836
IRubyObject constant = iterateConstantNoConstMissing(name, this, inherit, false, inheritObject);
48374837

4838-
if (constant == null && !isClass() && searchObject) {
4838+
if (constant == null && searchObject) {
48394839
constant = iterateConstantNoConstMissing(name, getRuntime().getObject(), inherit, false, true);
48404840
}
48414841

0 commit comments

Comments
 (0)