Skip to content

Commit 76dbfe2

Browse files
committed
Use getContext() in nodes
1 parent 72bff9d commit 76dbfe2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/org/truffleruby/debug/TruffleDebugNodes.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ protected Object yarpExecute(VirtualFrame frame, Object code,
310310
private Object doExecute(Object code, InternalMethod method) {
311311
TranslatorEnvironment.resetTemporaryVariablesIndex();
312312

313-
final RootCallTarget callTarget = RubyLanguage.getCurrentContext().getCodeLoader().parseWithYARP(
313+
final RootCallTarget callTarget = getContext().getCodeLoader().parseWithYARP(
314314
code,
315315
ParserContext.TOP_LEVEL,
316316
null,
317-
RubyLanguage.getCurrentContext().getRootLexicalScope(),
317+
getContext().getRootLexicalScope(),
318318
null);
319319

320320
RubyRootNode truffleAST = RubyRootNode.of(callTarget);
@@ -1447,11 +1447,11 @@ private RubyRootNode parse(String sourceCode) {
14471447
Source source = Source.newBuilder("ruby", sourceCode, "<parse_ast>").build();
14481448
TranslatorEnvironment.resetTemporaryVariablesIndex();
14491449

1450-
final RootCallTarget callTarget = RubyLanguage.getCurrentContext().getCodeLoader().parse(
1450+
final RootCallTarget callTarget = getContext().getCodeLoader().parse(
14511451
new RubySource(source, source.getName()),
14521452
ParserContext.TOP_LEVEL,
14531453
null,
1454-
RubyLanguage.getCurrentContext().getRootLexicalScope(),
1454+
getContext().getRootLexicalScope(),
14551455
null);
14561456

14571457
return RubyRootNode.of(callTarget);
@@ -1475,11 +1475,11 @@ protected Object parseAndDump(Object code, Object focusedNodeClassName, int inde
14751475
private RubyRootNode parse(Object code) {
14761476
TranslatorEnvironment.resetTemporaryVariablesIndex();
14771477

1478-
final RootCallTarget callTarget = RubyLanguage.getCurrentContext().getCodeLoader().parseWithYARP(
1478+
final RootCallTarget callTarget = getContext().getCodeLoader().parseWithYARP(
14791479
code,
14801480
ParserContext.TOP_LEVEL,
14811481
null,
1482-
RubyLanguage.getCurrentContext().getRootLexicalScope(),
1482+
getContext().getRootLexicalScope(),
14831483
null);
14841484

14851485
return RubyRootNode.of(callTarget);

0 commit comments

Comments
 (0)