aboutsummaryrefslogtreecommitdiffstats
path: root/yarp
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-09-13 14:32:40 -0400
committergit <svn-admin@ruby-lang.org>2023-09-14 13:39:06 +0000
commit9a1c5a1268a7f50917ab9782b0315fc2244d6dcc (patch)
treeb18e88003eafec07f43c0cd7adb7bec928530fc6 /yarp
parentc95f344798226ec3378e0bd53d2f0a57d027155b (diff)
downloadruby-9a1c5a1268a7f50917ab9782b0315fc2244d6dcc.tar.gz
[ruby/yarp] Handle invalid operator write on fcall
https://github.com/ruby/yarp/commit/22c800eab1
Diffstat (limited to 'yarp')
-rw-r--r--yarp/yarp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/yarp/yarp.c b/yarp/yarp.c
index 75150ff0bd..643f795c74 100644
--- a/yarp/yarp.c
+++ b/yarp/yarp.c
@@ -8169,6 +8169,7 @@ parse_target(yp_parser_t *parser, yp_node_t *target) {
// If we have no arguments to the call node and we need this to be a
// target then this is either a method call or a local variable write.
if (
+ ((call->message_loc.start != NULL) && (call->message_loc.end[-1] != '!') && (call->message_loc.end[-1] != '?')) &&
(call->opening_loc.start == NULL) &&
(call->arguments == NULL) &&
(call->block == NULL)