Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Original file line number Diff line number Diff line change
@@ -151,13 +151,11 @@ public void emitScope(IRScope scope, String name, Signature signature, boolean s

// Some scopes (closures, module/class bodies) do not have explicit call protocol yet.
// Unconditionally load current dynamic scope for those bodies.
// FIXME: If I don't load this there are some scopes that end up trying to use it before it is there
// Try uncommenting and running compiler specs.
// if (!scope.hasExplicitCallProtocol()) {
if (!scope.hasExplicitCallProtocol()) {
jvmMethod().loadContext();
jvmMethod().invokeVirtual(Type.getType(ThreadContext.class), Method.getMethod("org.jruby.runtime.DynamicScope getCurrentScope()"));
jvmStoreLocal(DYNAMIC_SCOPE);
// }
}

IRBytecodeAdapter m = jvmMethod();

0 comments on commit d6810e9

Please sign in to comment.