-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Multiple assignment evaluation order has been made consistent with
single assignment evaluation order. With single assignment, Ruby
uses a left-to-right evaluation order. With this code:
foo[0] = barThe following evaluation order is used:
foobar[]=called on the result offoo
In Ruby before 3.1.0, multiple assignment did not follow this
evaluation order. With this code:
foo[0], bar.baz = a, bVersions of Ruby before 3.1.0 would evaluate in the following
order
abfoo[]=called on the result offoobarbaz=called on the result ofbar
Starting in Ruby 3.1.0, the evaluation order is now consistent with
single assignment, with the left-hand side being evaluated before
the right-hand side:
foobarab[]=called on the result offoobaz=called on the result ofbar
[[Bug #4443]]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels