Skip to content
Permalink
Browse files
This check appears to be enough to know when to load scope now.
  • Loading branch information
headius committed Dec 22, 2014
1 parent ef0e585 commit d6810e9b5ab3afafe094aa1ee1d6439310ce85fc
Showing with 2 additions and 4 deletions.
  1. +2 −4 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
@@ -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.