Skip to content

Commit

Permalink
Use currScope instead of retrieving from DynamicScope.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Mar 2, 2018
1 parent f2d91a1 commit d8823f9
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ public String[] toStringNonOperandArgs() {
}

public IRubyObject callHelper(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block.Type blockType) {
StaticScope scope = currDynScope.getStaticScope();

if (helperMethod == Methods.IS_DEFINED_BACKREF) {
return IRRuntimeHelpers.isDefinedBackref(
context,
Expand All @@ -117,9 +115,9 @@ public IRubyObject callHelper(ThreadContext context, StaticScope currScope, Dyna
case HANDLE_PROPAGATED_BREAK:
return IRRuntimeHelpers.handlePropagatedBreak(context, currDynScope, arg1, blockType);
case HANDLE_NONLOCAL_RETURN:
return IRRuntimeHelpers.handleNonlocalReturn(currDynScope.getStaticScope(), currDynScope, arg1, blockType);
return IRRuntimeHelpers.handleNonlocalReturn(currScope, currDynScope, arg1, blockType);
case HANDLE_BREAK_AND_RETURNS_IN_LAMBDA:
return IRRuntimeHelpers.handleBreakAndReturnsInLambdas(context, currDynScope.getStaticScope(), currDynScope, arg1, blockType);
return IRRuntimeHelpers.handleBreakAndReturnsInLambdas(context, currScope, currDynScope, arg1, blockType);
case IS_DEFINED_CALL:
return IRRuntimeHelpers.isDefinedCall(
context,
Expand Down

0 comments on commit d8823f9

Please sign in to comment.