summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prism/prism.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/prism/prism.c b/prism/prism.c
index a5475b1753..2e0c941918 100644
--- a/prism/prism.c
+++ b/prism/prism.c
@@ -13849,6 +13849,18 @@ parse_write(pm_parser_t *parser, pm_node_t *target, pm_token_t *operator, pm_nod
// syntax error. In this case we'll fall through to our default
// handling. We need to free the value that we parsed because there
// is no way for us to attach it to the tree at this point.
+ switch (PM_NODE_TYPE(value)) {
+ case PM_LOCAL_VARIABLE_READ_NODE:
+ case PM_IT_LOCAL_VARIABLE_READ_NODE:
+ // Since it is possible for the value to be an implicit
+ // parameter, we need to remove it from the list of implicit
+ // parameters.
+ parse_target_implicit_parameter(parser, value);
+ break;
+ default:
+ break;
+ }
+
pm_node_destroy(parser, value);
}
PRISM_FALLTHROUGH