Skip to content

Commit 95363fe

Browse files
committed
Address this-escape warning in RubyRootNode
1 parent 485cfe7 commit 95363fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ public RubyRootNode(
6262

6363
// Ensure the body node is instrument-able, which requires a non-null SourceSection
6464
if (!body.hasSource()) {
65-
body.unsafeSetSourceSection(getSourceSection());
65+
body.unsafeSetSourceSection(sourceSection);
6666
}
6767

6868
body.unsafeSetIsCall();
6969
body.unsafeSetIsRoot();
7070

7171
if (language.options.CHECK_CLONE_UNINITIALIZED_CORRECTNESS) {
72-
this.bodyCopy = copyBody();
72+
this.bodyCopy = NodeUtil.cloneNode(body);
7373
} else {
7474
this.bodyCopy = null;
7575
}

0 commit comments

Comments
 (0)