Skip to content

Commit 89b288b

Browse files
committed
[Truffle] Document and simplify a few cases dealing with visibility in dispath.
1 parent 5d2e051 commit 89b288b

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

core/src/main/java/org/jruby/truffle/nodes/cast/ArrayCastNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public abstract class ArrayCastNode extends RubyNode {
2727

2828
public ArrayCastNode(RubyContext context, SourceSection sourceSection) {
2929
super(context, sourceSection);
30-
toArrayNode = new DispatchHeadNode(context, false, Dispatch.MissingBehavior.RETURN_MISSING);
30+
toArrayNode = new DispatchHeadNode(context, Dispatch.MissingBehavior.RETURN_MISSING);
3131
}
3232

3333
public ArrayCastNode(ArrayCastNode prev) {

core/src/main/java/org/jruby/truffle/nodes/cast/SplatCastNode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public static enum NilBehavior {
3737
public SplatCastNode(RubyContext context, SourceSection sourceSection, NilBehavior nilBehavior) {
3838
super(context, sourceSection);
3939
this.nilBehavior = nilBehavior;
40+
// Calling private #to_a is allowed for the *splat operator.
4041
toA = new DispatchHeadNode(context, true, Dispatch.MissingBehavior.RETURN_MISSING);
4142
}
4243

core/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ public abstract static class InjectNode extends YieldingArrayCoreMethodNode {
18291829

18301830
public InjectNode(RubyContext context, SourceSection sourceSection) {
18311831
super(context, sourceSection);
1832-
dispatch = new DispatchHeadNode(context, false, Dispatch.MissingBehavior.CALL_METHOD_MISSING);
1832+
dispatch = new DispatchHeadNode(context, Dispatch.MissingBehavior.CALL_METHOD_MISSING);
18331833
}
18341834

18351835
public InjectNode(InjectNode prev) {

core/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ public abstract static class DupNode extends CoreMethodNode {
455455

456456
public DupNode(RubyContext context, SourceSection sourceSection) {
457457
super(context, sourceSection);
458+
// Calls private initialize_dup on the new copy.
458459
initializeDupNode = new DispatchHeadNode(context, true, Dispatch.MissingBehavior.CALL_METHOD_MISSING);
459460
}
460461

0 commit comments

Comments
 (0)