Skip to content

Commit 5186351

Browse files
committed
Use CallNode#isVariableCall()
1 parent bae3c79 commit 5186351

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/parser/YARPTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ public RubyNode visitCallNode(Nodes.CallNode node) {
442442
}
443443

444444
boolean ignoreVisibility = node.receiver == null;
445-
boolean isVCall = arguments.length == 0 && (node.opening_loc == null || node.closing_loc == null); // only `foo` without arguments and `()`
445+
boolean isVCall = node.isVariableCall();
446446
boolean isAttrAssign = methodName.endsWith("=");
447447
var rubyCallNode = new RubyCallNode(new RubyCallNodeParameters(receiver, methodName, null,
448448
EmptyArgumentsDescriptor.INSTANCE, translatedArguments, false, ignoreVisibility, isVCall, false,

0 commit comments

Comments
 (0)