Skip to content

Commit d6810e9

Browse files
committed
This check appears to be enough to know when to load scope now.
1 parent ef0e585 commit d6810e9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/src/main/java/org/jruby/ir/targets/JVMVisitor.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,11 @@ public void emitScope(IRScope scope, String name, Signature signature, boolean s
151151

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

162160
IRBytecodeAdapter m = jvmMethod();
163161

0 commit comments

Comments
 (0)