Skip to content

Commit 07e6c50

Browse files
committed
Update getCurrentContext()/getCurrentLanguage() to use the new references
1 parent 3c55574 commit 07e6c50

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/org/truffleruby/RubyContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ public Hashing getHashing() {
542542

543543
public RubyLanguage getLanguageSlow() {
544544
CompilerAsserts.neverPartOfCompilation(
545-
"Use getLanguage() or @CachedLanguage instead, so the RubyLanguage instance is constant in PE code");
545+
"Use getLanguage() or RubyLanguage.get(Node) instead, so the RubyLanguage instance is constant in PE code");
546546
return language;
547547
}
548548

src/main/java/org/truffleruby/RubyLanguage.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,13 +463,13 @@ protected void disposeContext(RubyContext context) {
463463
}
464464

465465
public static RubyContext getCurrentContext() {
466-
CompilerAsserts.neverPartOfCompilation("Use getContext() or @CachedContext instead in PE code");
467-
return getCurrentContext(RubyLanguage.class);
466+
CompilerAsserts.neverPartOfCompilation("Use getContext() or RubyContext.get(Node) instead in PE code");
467+
return RubyContext.get(null);
468468
}
469469

470470
public static RubyLanguage getCurrentLanguage() {
471-
CompilerAsserts.neverPartOfCompilation("Use getLanguage() or @CachedLanguage instead in PE code");
472-
return getCurrentLanguage(RubyLanguage.class);
471+
CompilerAsserts.neverPartOfCompilation("Use getLanguage() or RubyLanguage.get(Node) instead in PE code");
472+
return RubyLanguage.get(null);
473473
}
474474

475475
@Override

0 commit comments

Comments
 (0)