From 74780c3e7f58e2c098f11f481c9ea0302a6a05de Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Mon, 21 Aug 2023 17:56:08 -0400 Subject: [PATCH] [ruby/yarp] Call shorthand should not result in a message location https://github.com/ruby/yarp/commit/ad0f9d35e3 --- test/yarp/snapshots/method_calls.txt | 6 +++--- test/yarp/snapshots/seattlerb/call_colon_parens.txt | 2 +- test/yarp/snapshots/seattlerb/call_dot_parens.txt | 2 +- test/yarp/snapshots/seattlerb/safe_call_dot_parens.txt | 2 +- test/yarp/snapshots/seattlerb/thingy.txt | 4 ++-- test/yarp/snapshots/whitequark/send_call.txt | 4 ++-- yarp/yarp.c | 2 +- 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,