summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-08-21 17:56:08 -0400
committergit <svn-admin@ruby-lang.org>2023-08-25 21:10:10 +0000
commit74780c3e7f58e2c098f11f481c9ea0302a6a05de (patch)
tree5f57e1f057b735f5b7918dc30cc29994f5472265
parent85c8e8b9bd1c50c6affff019b8749271a64a9950 (diff)
[ruby/yarp] Call shorthand should not result in a message location
https://github.com/ruby/yarp/commit/ad0f9d35e3
-rw-r--r--test/yarp/snapshots/method_calls.txt6
-rw-r--r--test/yarp/snapshots/seattlerb/call_colon_parens.txt2
-rw-r--r--test/yarp/snapshots/seattlerb/call_dot_parens.txt2
-rw-r--r--test/yarp/snapshots/seattlerb/safe_call_dot_parens.txt2
-rw-r--r--test/yarp/snapshots/seattlerb/thingy.txt4
-rw-r--r--test/yarp/snapshots/whitequark/send_call.txt4
-rw-r--r--yarp/yarp.c2
7 files changed, 11 insertions, 11 deletions
diff --git a/test/yarp/snapshots/method_calls.txt b/test/yarp/snapshots/method_calls.txt
index b2c84d0d35..ebda131feb 100644
--- a/test/yarp/snapshots/method_calls.txt
+++ b/test/yarp/snapshots/method_calls.txt
@@ -64,7 +64,7 @@ ProgramNode(0...1237)(
CallNode(58...62)(
CallNode(58...59)(nil, nil, (58...59), nil, nil, nil, nil, 2, "a"),
(59...60),
- (0...0),
+ nil,
(60...61),
nil,
(61...62),
@@ -75,7 +75,7 @@ ProgramNode(0...1237)(
CallNode(64...75)(
CallNode(64...65)(nil, nil, (64...65), nil, nil, nil, nil, 2, "a"),
(65...66),
- (0...0),
+ nil,
(66...67),
ArgumentsNode(67...74)(
[IntegerNode(67...68)(),
@@ -413,7 +413,7 @@ ProgramNode(0...1237)(
CallNode(212...217)(
CallNode(212...213)(nil, nil, (212...213), nil, nil, nil, nil, 2, "a"),
(213...215),
- (0...0),
+ nil,
(215...216),
nil,
(216...217),
diff --git a/test/yarp/snapshots/seattlerb/call_colon_parens.txt b/test/yarp/snapshots/seattlerb/call_colon_parens.txt
index 2e707afcfb..14c7247bcd 100644
--- a/test/yarp/snapshots/seattlerb/call_colon_parens.txt
+++ b/test/yarp/snapshots/seattlerb/call_colon_parens.txt
@@ -4,7 +4,7 @@ ProgramNode(0...5)(
[CallNode(0...5)(
IntegerNode(0...1)(),
(1...3),
- (0...0),
+ nil,
(3...4),
nil,
(4...5),
diff --git a/test/yarp/snapshots/seattlerb/call_dot_parens.txt b/test/yarp/snapshots/seattlerb/call_dot_parens.txt
index 5a32c3b9cf..073336ed48 100644
--- a/test/yarp/snapshots/seattlerb/call_dot_parens.txt
+++ b/test/yarp/snapshots/seattlerb/call_dot_parens.txt
@@ -4,7 +4,7 @@ ProgramNode(0...4)(
[CallNode(0...4)(
IntegerNode(0...1)(),
(1...2),
- (0...0),
+ nil,
(2...3),
nil,
(3...4),
diff --git a/test/yarp/snapshots/seattlerb/safe_call_dot_parens.txt b/test/yarp/snapshots/seattlerb/safe_call_dot_parens.txt
index 63a6f3822a..5800090fbb 100644
--- a/test/yarp/snapshots/seattlerb/safe_call_dot_parens.txt
+++ b/test/yarp/snapshots/seattlerb/safe_call_dot_parens.txt
@@ -4,7 +4,7 @@ ProgramNode(0...5)(
[CallNode(0...5)(
CallNode(0...1)(nil, nil, (0...1), nil, nil, nil, nil, 2, "a"),
(1...3),
- (0...0),
+ nil,
(3...4),
nil,
(4...5),
diff --git a/test/yarp/snapshots/seattlerb/thingy.txt b/test/yarp/snapshots/seattlerb/thingy.txt
index f12a16ed4f..929dd9fd96 100644
--- a/test/yarp/snapshots/seattlerb/thingy.txt
+++ b/test/yarp/snapshots/seattlerb/thingy.txt
@@ -4,7 +4,7 @@ ProgramNode(0...15)(
[CallNode(0...6)(
CallNode(0...1)(nil, nil, (0...1), nil, nil, nil, nil, 2, "f"),
(1...2),
- (0...0),
+ nil,
(2...3),
ArgumentsNode(3...5)([IntegerNode(3...5)()]),
(5...6),
@@ -15,7 +15,7 @@ ProgramNode(0...15)(
CallNode(8...15)(
CallNode(8...9)(nil, nil, (8...9), nil, nil, nil, nil, 2, "f"),
(9...11),
- (0...0),
+ nil,
(11...12),
ArgumentsNode(12...14)([IntegerNode(12...14)()]),
(14...15),
diff --git a/test/yarp/snapshots/whitequark/send_call.txt b/test/yarp/snapshots/whitequark/send_call.txt
index 4280323078..f96195145b 100644
--- a/test/yarp/snapshots/whitequark/send_call.txt
+++ b/test/yarp/snapshots/whitequark/send_call.txt
@@ -4,7 +4,7 @@ ProgramNode(0...17)(
[CallNode(0...7)(
CallNode(0...3)(nil, nil, (0...3), nil, nil, nil, nil, 2, "foo"),
(3...4),
- (0...0),
+ nil,
(4...5),
ArgumentsNode(5...6)([IntegerNode(5...6)()]),
(6...7),
@@ -15,7 +15,7 @@ ProgramNode(0...17)(
CallNode(9...17)(
CallNode(9...12)(nil, nil, (9...12), nil, nil, nil, nil, 2, "foo"),
(12...14),
- (0...0),
+ nil,
(14...15),
ArgumentsNode(15...16)([IntegerNode(15...16)()]),
(16...17),
diff --git a/yarp/yarp.c b/yarp/yarp.c
index ad762d89a3..29846998a4 100644
--- a/yarp/yarp.c
+++ b/yarp/yarp.c
@@ -1197,7 +1197,7 @@ yp_call_node_create(yp_parser_t *parser) {
},
.receiver = NULL,
.operator_loc = YP_OPTIONAL_LOCATION_NOT_PROVIDED_VALUE,
- .message_loc = YP_LOCATION_NULL_VALUE(parser),
+ .message_loc = YP_OPTIONAL_LOCATION_NOT_PROVIDED_VALUE,
.opening_loc = YP_OPTIONAL_LOCATION_NOT_PROVIDED_VALUE,
.arguments = NULL,
.closing_loc = YP_OPTIONAL_LOCATION_NOT_PROVIDED_VALUE,