[#107867] Fwd: [ruby-cvs:91197] 8f59482f5d (master): add some tests for Unicode Version 14.0.0 — Martin J. Dürst <duerst@...>
To everybody taking care of continuous integration:
3 messages
2022/03/13
[#108090] [Ruby master Bug#18666] No rule to make target 'yaml/yaml.h', needed by 'api.o' — duerst <noreply@...>
Issue #18666 has been reported by duerst (Martin D端rst).
7 messages
2022/03/28
[#108117] [Ruby master Feature#18668] Merge `io-nonblock` gems into core — "Eregon (Benoit Daloze)" <noreply@...>
Issue #18668 has been reported by Eregon (Benoit Daloze).
22 messages
2022/03/30
[ruby-core:107884] [Ruby master Bug#18629] block args array splatting assigns to higher scope _ var
From:
"jeremyevans0 (Jeremy Evans)" <noreply@...>
Date:
2022-03-13 16:57:42 UTC
List:
ruby-core #107884
Issue #18629 has been updated by jeremyevans0 (Jeremy Evans).
I'm guessing this isn't a bug, because variables prefixed by `_` (including `_` itself) are supposed to be used in cases where you are ignoring the values. There are other cases where `_` prefixed variables are special:
```ruby
def a(b, b) end # SyntaxError
def a(_b, _b) end # no error
```
----------------------------------------
Bug #18629: block args array splatting assigns to higher scope _ var
https://bugs.ruby-lang.org/issues/18629#change-96825
* Author: Nakilon (Victor Maslov)
* Status: Open
* Priority: Normal
* ruby -v: 3.0.2
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
``` ruby
v = 1; [[2]].each{ |(v)| }; p v
_ = 1; [[2]].each{ |(_)| }; p _
```
prints
```
1
2
```
You can see here that `v` is still `1` but `_` isn't shadowed properly and is being assigned `2`.
Reproducible from 2.3.8 to 3.0.2 (macOS rbenv)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>