|
4 | 4 | import org.jruby.ir.IRFlags;
|
5 | 5 | import org.jruby.ir.IRMetaClassBody;
|
6 | 6 | import org.jruby.ir.IRScope;
|
| 7 | +import org.jruby.parser.StaticScope; |
7 | 8 | import org.jruby.runtime.Block;
|
8 | 9 | import org.jruby.runtime.DynamicScope;
|
9 | 10 | import org.jruby.runtime.ThreadContext;
|
@@ -41,14 +42,14 @@ protected void post(ThreadContext context) {
|
41 | 42 | }
|
42 | 43 |
|
43 | 44 | @Override
|
44 |
| - protected void pre(ThreadContext context, IRubyObject self, String name, Block block) { |
| 45 | + protected void pre(ThreadContext context, StaticScope staticScope, RubyModule implementationClass, IRubyObject self, String name, Block block) { |
45 | 46 | // update call stacks (push: frame, class, scope, etc.)
|
46 |
| - context.preMethodFrameOnly(getImplementationClass(), name, self, block); |
| 47 | + context.preMethodFrameOnly(implementationClass, name, self, block); |
47 | 48 | if (pushNewDynScope) {
|
48 | 49 | // Add a parent-link to current dynscope to support non-local returns cheaply
|
49 | 50 | // This doesn't affect variable scoping since local variables will all have
|
50 | 51 | // the right scope depth.
|
51 |
| - context.pushScope(DynamicScope.newDynamicScope(method.getStaticScope(), context.getCurrentScope())); |
| 52 | + context.pushScope(DynamicScope.newDynamicScope(staticScope, context.getCurrentScope())); |
52 | 53 | }
|
53 | 54 | context.setCurrentVisibility(getVisibility());
|
54 | 55 | }
|
|
0 commit comments