summaryrefslogtreecommitdiff
path: root/test/prism/result/implicit_array_test.rb
AgeCommit message (Collapse)Author
2024-06-13[ruby/prism] Handle implicit array precedenceKevin Newton
When an implicit array is used in a write, is causes the whole expression to become a statement. For example: ```ruby a = *b a = 1, 2, 3 ``` Even though these expressions are exactly equivalent to their explicit array counterparts: ```ruby 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. https://github.com/ruby/prism/commit/7cd2407272