Closed kddnewton closed 3 weeks ago
Fixes https://github.com/ruby/prism/issues/2012
When an implicit array is used in a write, is causes the whole expression to become a statement. For example:
a = *b a = 1, 2, 3
Even though these expressions are exactly equivalent to their explicit array counterparts:
a = [*b] a = [1, 2, 3]
As such, these expressions cannot be joined with other expressions by operators or modifiers except if, unless, while, until, or rescue.
Fixes https://github.com/ruby/prism/issues/2012
When an implicit array is used in a write, is causes the whole expression to become a statement. For example:
Even though these expressions are exactly equivalent to their explicit array counterparts:
As such, these expressions cannot be joined with other expressions by operators or modifiers except if, unless, while, until, or rescue.