Skip to content

Commit b0915b2

Browse files
committed
Add a note about RootNode.isInternal()
* Reimplement it more simply in RubyBaseRootNode.
1 parent 45a62d2 commit b0915b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/org/truffleruby/language/RubyBaseRootNode.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ public final SourceSection getSourceSection() {
2828
return sourceSection;
2929
}
3030

31+
// NOTE (eregon, 11 Jan 2019): TruffleStackTrace calls this on the fast path, so it should constant-fold.
32+
@Override
33+
public boolean isInternal() {
34+
if (sourceSection != null) {
35+
return sourceSection.getSource().isInternal();
36+
}
37+
return false;
38+
}
39+
3140
@Override
3241
public boolean isCaptureFramesForTrace() {
3342
return true;

0 commit comments

Comments
 (0)