Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Original file line number Diff line number Diff line change
@@ -158,10 +158,11 @@ public void emitScope(IRScope scope, String name, Signature signature, boolean s
jvmMethod().loadContext();
jvmMethod().invokeVirtual(Type.getType(ThreadContext.class), Method.getMethod("org.jruby.runtime.DynamicScope getCurrentScope()"));
jvmStoreLocal(DYNAMIC_SCOPE);
} else {
// just assign null so it verifies ok
} else if (scope instanceof IRClosure) {
// just load scope from context
// FIXME: don't do this if we won't need the scope
jvmAdapter().aconst_null();
jvmMethod().loadContext();
jvmAdapter().invokevirtual(p(ThreadContext.class), "getCurrentScope", sig(DynamicScope.class));
jvmStoreLocal(DYNAMIC_SCOPE);
}

0 comments on commit c5ae2cd

Please sign in to comment.