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.3.md
+13-4Lines changed: 13 additions & 4 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.3 full and annotated changelog
8
8
# Ruby 3.3
9
9
10
10
***Released at:** Dec 25, 2023 (<aclass="github"href="https://github.com/ruby/ruby/blob/ruby_3_3/NEWS.md">NEWS.md</a> file)
11
-
***Status (as of Dec 25, 2023):** 3.3.0 is recently released
11
+
***Status (as of Dec 27, 2023):** 3.3.0 is recently released
12
12
***This document first published:** Dec 25, 2023
13
-
***Last change to this document:** Dec 25, 2023
13
+
***Last change to this document:** Dec 27, 2023
14
14
15
15
<!--
16
16
* **Reason:**
@@ -38,7 +38,7 @@ description: Ruby 3.3 full and annotated changelog
38
38
39
39
In Ruby 3.3, it will just warn to prepare for a change.
40
40
41
-
***Reason:** Numeric designation for anonymous bloc arguments (`_1`, `_2`, and so on) were considered ugly by many people, so after years of discussion, the `it` keyword is to be introduced on the next Ruby version; for now, it just warns _in places where it would be considered an anonymous block argument_.
41
+
***Reason:** Numeric designation for anonymous block arguments (`_1`, `_2`, and so on) were considered ugly by many people, so after years of discussion, the `it` keyword is to be introduced on the next Ruby version; for now, it just warns _in places where it would be considered an anonymous block argument_.
***Code:** In the code below, where Ruby 3.3 currently produces a warning, Ruby 3.4 would treat `it` as an anonymous block argument; where Ruby 3.3 doesn't produce a warning, Ruby 3.4 would treat `it` as a local variable name or a method call (and would look for such names available in the scope).
44
44
```ruby
@@ -105,7 +105,16 @@ Now anonymous parameters forwarding inside a block raise error.
105
105
# "test"
106
106
# "test"
107
107
```
108
-
***Notes:** There is a [question](https://bugs.ruby-lang.org/issues/19370#note-9) whether disallowing block parameters forwarding is the best way to solve the confusion; alternative solution would be just to support forwarding inside the block properly. I hope the discussion to continue during 3.4 development.
108
+
***Notes:**
109
+
* There is a [question](https://bugs.ruby-lang.org/issues/19370#note-9) whether disallowing block parameters forwarding is the best way to solve the confusion; alternative solution would be just to support forwarding inside the block properly. I hope the discussion to continue during 3.4 development.
110
+
* In the 3.3.0 release, the prohibition was accidentally too greedy, affecting lambdas with unambiguous forwarding, see <aclass="tracker bug"href="https://bugs.ruby-lang.org/issues/20090">Bug #20090</a>:
111
+
```ruby
112
+
defb(*)
113
+
-> { c(*) } # Unambiguous, yet raises:
114
+
# anonymous rest parameter is also used within block (SyntaxError)
115
+
end
116
+
```
117
+
This is already fixed to be released in the next minor version.
109
118
110
119
## Core classes and modules[](#core-classes-and-modules)
Copy file name to clipboardExpand all lines: _src/3.3.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ description: Ruby 3.3 full and annotated changelog
38
38
39
39
In Ruby 3.3, it will just warn to prepare for a change.
40
40
41
-
***Reason:** Numeric designation for anonymous bloc arguments (`_1`, `_2`, and so on) were considered ugly by many people, so after years of discussion, the `it` keyword is to be introduced on the next Ruby version; for now, it just warns _in places where it would be considered an anonymous block argument_.
41
+
***Reason:** Numeric designation for anonymous block arguments (`_1`, `_2`, and so on) were considered ugly by many people, so after years of discussion, the `it` keyword is to be introduced on the next Ruby version; for now, it just warns _in places where it would be considered an anonymous block argument_.
***Code:** In the code below, where Ruby 3.3 currently produces a warning, Ruby 3.4 would treat `it` as an anonymous block argument; where Ruby 3.3 doesn't produce a warning, Ruby 3.4 would treat `it` as a local variable name or a method call (and would look for such names available in the scope).
44
44
```ruby
@@ -105,7 +105,16 @@ Now anonymous parameters forwarding inside a block raise error.
105
105
# "test"
106
106
# "test"
107
107
```
108
-
***Notes:** There is a [question](https://bugs.ruby-lang.org/issues/19370#note-9) whether disallowing block parameters forwarding is the best way to solve the confusion; alternative solution would be just to support forwarding inside the block properly. I hope the discussion to continue during 3.4 development.
108
+
***Notes:**
109
+
* There is a [question](https://bugs.ruby-lang.org/issues/19370#note-9) whether disallowing block parameters forwarding is the best way to solve the confusion; alternative solution would be just to support forwarding inside the block properly. I hope the discussion to continue during 3.4 development.
110
+
* In the 3.3.0 release, the prohibition was accidentally too greedy, affecting lambdas with unambiguous forwarding, see [Bug #20090](https://bugs.ruby-lang.org/issues/20090):
111
+
```ruby
112
+
defb(*)
113
+
-> { c(*) } # Unambiguous, yet raises:
114
+
# anonymous rest parameter is also used within block (SyntaxError)
115
+
end
116
+
```
117
+
This is already fixed to be released in the next minor version.
0 commit comments