Skip to content

Commit

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

final org.jruby.parser.ParserConfiguration parserConfiguration = new org.jruby.parser.ParserConfiguration(context.getRuntime(), 0, false, parserContext == ParserContext.TOP_LEVEL, true);
boolean isInlineSource = parserContext == ParserContext.SHELL;
boolean isEvalParse = parserContext == ParserContext.EVAL || parserContext == ParserContext.MODULE;
final org.jruby.parser.ParserConfiguration parserConfiguration = new org.jruby.parser.ParserConfiguration(context.getRuntime(), 0, isInlineSource, !isEvalParse, true);
parserConfiguration.setDefaultEncoding(defaultEncoding);

// Parse to the JRuby AST

0 comments on commit cc92c10

Please sign in to comment.