1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[DOC] Fixed indents in NEWS.md [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2021-09-11 19:18:22 +09:00
parent 28df037718
commit 8e832ea031
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

54
NEWS.md
View file

@ -33,41 +33,41 @@ Note that each entry is kept to a minimum, see links for details.
foo[0] = bar foo[0] = bar
``` ```
The following evaluation order is used: The following evaluation order is used:
1. `foo` 1. `foo`
2. `bar` 2. `bar`
3. `[]=` called on the result of `foo` 3. `[]=` called on the result of `foo`
In Ruby before 3.1.0, multiple assignment did not follow this In Ruby before 3.1.0, multiple assignment did not follow this
evaluation order. With this code: evaluation order. With this code:
```ruby ```ruby
foo[0], bar.baz = a, b foo[0], bar.baz = a, b
``` ```
Versions of Ruby before 3.1.0 would evaluate in the following Versions of Ruby before 3.1.0 would evaluate in the following
order order
1. `a` 1. `a`
2. `b` 2. `b`
3. `foo` 3. `foo`
4. `[]=` called on the result of `foo` 4. `[]=` called on the result of `foo`
5. `bar` 5. `bar`
6. `baz=` called on the result of `bar` 6. `baz=` called on the result of `bar`
Starting in Ruby 3.1.0, evaluation order is now consistent with Starting in Ruby 3.1.0, evaluation order is now consistent with
single assignment, with the left hand side being evaluated before single assignment, with the left hand side being evaluated before
the right hand side: the right hand side:
1. `foo` 1. `foo`
2. `bar` 2. `bar`
3. `a` 3. `a`
4. `b` 4. `b`
5. `[]=` called on the result of `foo` 5. `[]=` called on the result of `foo`
6. `baz=` called on the result of `bar` 6. `baz=` called on the result of `bar`
[[Bug #4443]] [[Bug #4443]]
## Command line options ## Command line options