You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _src/evolution.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -327,7 +327,7 @@ This section lists changes in how methods are defined and invoked, as well as ne
327
327
* [2.6](2.6.md#proc-composition) **`Proc` composition with [>>](https://docs.ruby-lang.org/en/2.6.0/Proc.html#method-i-3E-3E) and [<<](https://docs.ruby-lang.org/en/2.6.0/Proc.html#method-i-3C-3C)**:
@@ -950,7 +950,7 @@ Freezing of object makes its state immutable. The important thing about freezing
950
950
* **2.0** Fixnums, Bignums and Floats are frozen. While number values never were mutable, before Ruby 2.0 it was possible to change additional internal state for them, making it weird:
951
951
```ruby
952
952
10.instance_variable_set('@foo', 5) # works in 1.9, "can't modify frozen Fixnum" in 2.0
953
-
10.instance_variable_set('@foo') # => 5 in Ruby 1.9
953
+
10.instance_variable_get('@foo') # => 5 in Ruby 1.9
954
954
```
955
955
* **2.1** All symbols are frozen.
956
956
* **2.1** `"string_literal".freeze` is optimized to always return the same object for same literal
@@ -971,11 +971,11 @@ Freezing of object makes its state immutable. The important thing about freezing
971
971
* **2.1** — 2013, Dec 25 (the same as every version after this)
@@ -950,7 +950,7 @@ Freezing of object makes its state immutable. The important thing about freezing
950
950
* <span class="ruby-version">**2.0**</span> Fixnums, Bignums and Floats are frozen. While number values never were mutable, before Ruby 2.0 it was possible to change additional internal state for them, making it weird:
951
951
```ruby
952
952
10.instance_variable_set('@foo', 5) # works in 1.9, "can't modify frozen Fixnum" in 2.0
953
-
10.instance_variable_set('@foo') # => 5 in Ruby 1.9
953
+
10.instance_variable_get('@foo') # => 5 in Ruby 1.9
954
954
```
955
955
* <span class="ruby-version">**2.1**</span> All symbols are frozen.
956
956
* <span class="ruby-version">**2.1**</span> `"string_literal".freeze` is optimized to always return the same object for same literal
@@ -971,11 +971,11 @@ Freezing of object makes its state immutable. The important thing about freezing
971
971
*<span class="ruby-version">**2.1**</span> — 2013, Dec25 (the same as every version after this)
0 commit comments