Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -110,6 +110,8 @@ public IRubyObject searchConst(ThreadContext context, StaticScope staticScope) {
}

public IRubyObject searchModuleForConst(ThreadContext context, IRubyObject cmVal) throws Throwable {
if (!(cmVal instanceof RubyModule)) throw context.runtime.newTypeError(cmVal + " is not a type/class");

RubyModule module = (RubyModule) cmVal;

if (checkForBailout(module)) {
@@ -140,6 +142,8 @@ public IRubyObject searchModuleForConst(ThreadContext context, IRubyObject cmVal
}

public IRubyObject noCacheSearchModuleForConst(ThreadContext context, IRubyObject cmVal) {
if (!(cmVal instanceof RubyModule)) throw context.runtime.newTypeError(cmVal + " is not a type/class");

RubyModule module = (RubyModule) cmVal;

// Inheritance lookup

0 comments on commit 8131628

Please sign in to comment.