Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -137,7 +137,7 @@ public RubyRootNode parse(RubyContext context, Source source, Encoding defaultEn
}
}

final DynamicScope ManyVarsDynamicScope = new DynamicScope(staticScope);
final DynamicScope dynamicScope = new DynamicScope(staticScope);

boolean isInlineSource = parserContext == ParserContext.SHELL;
boolean isEvalParse = parserContext == ParserContext.EVAL || parserContext == ParserContext.INLINE || parserContext == ParserContext.MODULE;
@@ -151,7 +151,7 @@ public RubyRootNode parse(RubyContext context, Source source, Encoding defaultEn

// Parse to the JRuby AST

RootParseNode node = parse(source, ManyVarsDynamicScope, parserConfiguration);
RootParseNode node = parse(source, dynamicScope, parserConfiguration);

final SourceSection sourceSection = source.createSection(0, source.getCode().length());
final TempSourceSection tempSourceSection = new TempSourceSection(sourceSection);
@@ -295,7 +295,7 @@ public RootParseNode parse(Source source, DynamicScope blockScope,
// If variables were added then we may need to grow the dynamic scope to match the static
// one.
// FIXME: Make this so we only need to check this for blockScope != null. We cannot
// currently since we create the ManyVarsDynamicScope for a LocalStaticScope before parse begins.
// currently since we create the DynamicScope for a LocalStaticScope before parse begins.
// Refactoring should make this fixable.
if (result.getScope() != null) {
result.getScope().growIfNeeded();

0 comments on commit 2bafb78

Please sign in to comment.