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: 3.1.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ description: Ruby 3.1 full and annotated changelog
8
8
# Ruby 3.1
9
9
10
10
***Released at:** Dec 25, 2021 (<aclass="github"href="https://github.com/ruby/ruby/blob/ruby_3_1/NEWS.md">NEWS.md</a> file)
11
-
***Status (as of Sep 20, 2023):** 3.1.4 is current _stable_
11
+
***Status (as of Nov 08, 2023):** 3.1.4 is current _stable_
12
12
***This document first published:** Jan 5, 2022
13
-
***Last change to this document:**Sep 20, 2023
13
+
***Last change to this document:**Nov 08, 2023
14
14
15
15
> **Note:** As already explained in [Introduction](README.md), this site is dedicated to changes in the **language**, not the **implementation**, therefore the list below lacks mentions of lots of important optimization introduced in 3.1, including a new JIT named YJIT. That's not because they are not important, just because this site's goals are different.
16
16
@@ -33,9 +33,8 @@ _**See also my [this year's ongoing post series](https://zverok.substack.com/p/w
33
33
34
34
In hash literals and method calls, `x:` is now a shortcut for `x: x`—take hash value from the context, with the same name as a key.
Copy file name to clipboardExpand all lines: _src/evolution.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -341,7 +341,7 @@ This section lists changes in how methods are defined and invoked, as well as ne
341
341
```
342
342
* [3.1](3.1.md#methodunboundmethod-public-private-protected) [Method#private?](https://docs.ruby-lang.org/en/3.1/Method.html#method-i-private-3F), `#protected?`, `#public?`, same are defined for `UnboundMethod`
343
343
* [3.2](3.2.md#methodpublic-protected-and-private-are-removed) The change was reverted.
344
-
* [3.1](3.1.md#values-in-hash-literals-and-keyword-arguments-can-be-omitted) **Values in keyword arguments [can be omitted](https://docs.ruby-lang.org/en/3.1/syntax/methods_rdoc.html#label-Keyword+Arguments)**:
344
+
* [3.1](3.1.md#values-in-hash-literals-and-keyword-arguments-can-be-omitted) **Values in keyword arguments [can be omitted](https://docs.ruby-lang.org/en/3.1/syntax/calling_methods_rdoc.html#label-Keyword+Arguments)**:
345
345
```ruby
346
346
x = 100
347
347
p(x:) # same as p(x: x), prints: {:x => 100}
@@ -533,7 +533,7 @@ Included in many classes to implement comparison methods. Once class defines a m
533
533
534
534
## `Data`
535
535
536
-
* [3.2](3.2.md#data-new-immutable-value-object-class) **[Data](https://docs.ruby-lang.org/en/3.2/Data.html): new immutable value object class introduced.** It has a stricter and leander interface than `Struct`:
536
+
* [3.2](3.2.md#data-new-immutable-value-object-class) **[Data](https://docs.ruby-lang.org/en/3.2/Data.html): new immutable value object class introduced.** It has a stricter and leaner interface than `Struct`:
* <spanclass="ruby-version">[2.7](2.7.md#keyword-argument-related-changes)</span> **[Big Keyword Argument Separation](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/):** some incompatibilities were introduced by need, so the distinction of keyword arguments and hashes in method arguments was more clear, handling numerous irritating edge cases.
326
326
* <spanclass="ruby-version">[2.7](2.7.md#keyword-argument-related-changes)</span> Introduce argument forwarding with `method(...)` syntax. As after the keyword argument separation "delegate everything" syntax became more complicated (you need to use and pass `(*args, **kwargs)`, because just `*args` wouldn't always work), simplified syntax was introduced:
327
327
```ruby
@@ -341,7 +341,7 @@ This section lists changes in how methods are defined and invoked, as well as ne
341
341
```
342
342
* <span class="ruby-version">[3.1](3.1.md#methodunboundmethod-public-private-protected)</span> <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/Method.html#method-i-private-3F"><code>Method#private?</code></a>, `#protected?`, `#public?`, same are defined for `UnboundMethod`
343
343
*<span class="ruby-version">[3.2](3.2.md#methodpublic-protected-and-private-are-removed)</span> The change was reverted.
344
-
*<span class="ruby-version">[3.1](3.1.md#values-in-hash-literals-and-keyword-arguments-can-be-omitted)</span> **Values in keyword arguments <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/syntax/methods_rdoc.html#label-Keyword+Arguments">can be omitted</a>**:
344
+
*<span class="ruby-version">[3.1](3.1.md#values-in-hash-literals-and-keyword-arguments-can-be-omitted)</span> **Values in keyword arguments <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/syntax/calling_methods_rdoc.html#label-Keyword+Arguments">can be omitted</a>**:
0 commit comments