[#90865] [Ruby trunk Bug#15499] Breaking behavior on ruby 2.6: rb_thread_call_without_gvl doesn't invoke unblock_function when used on the main thread — apolcyn@...
Issue #15499 has been reported by apolcyn (alex polcyn).
3 messages
2019/01/03
[#90877] [Ruby trunk Bug#15499] Breaking behavior on ruby 2.6: rb_thread_call_without_gvl doesn't invoke unblock_function when used on the main thread — apolcyn@...
Issue #15499 has been updated by apolcyn (alex polcyn).
3 messages
2019/01/03
[#90895] Re: [ruby-alerts:11680] failure alert on trunk-mjit@silicon-docker (NG (r66707)) — Eric Wong <normalperson@...>
ko1c-failure@atdot.net wrote:
4 messages
2019/01/05
[#90896] Re: [ruby-alerts:11680] failure alert on trunk-mjit@silicon-docker (NG (r66707))
— Takashi Kokubun <takashikkbn@...>
2019/01/05
Thanks to explain that.
[#91200] [Ruby trunk Feature#15553] Addrinfo.getaddrinfo supports timeout — glass.saga@...
Issue #15553 has been reported by Glass_saga (Masaki Matsushita).
4 messages
2019/01/21
[#91289] Re: [Ruby trunk Feature#15553] Addrinfo.getaddrinfo supports timeout
— Eric Wong <normalperson@...>
2019/01/26
glass.saga@gmail.com wrote:
[ruby-core:90914] [Ruby trunk Misc#15514] Add documentation for implicit array decomposition
From:
shevegen@...
Date:
2019-01-07 11:10:50 UTC
List:
ruby-core #90914
Issue #15514 has been updated by shevegen (Robert A. Heiler).
Agreed.
----------------------------------------
Misc #15514: Add documentation for implicit array decomposition
https://bugs.ruby-lang.org/issues/15514#change-76105
* Author: sos4nt (Stefan Schüßler)
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
The documentation for [Array Decomposition](http://ruby-doc.org/core/doc/syntax/assignment_rdoc.html#label-Array+Decomposition) says: _"[...] you can decompose an Array during assignment using parenthesis [sic]"_ and gives an example:
```ruby
(a, b) = [1, 2]
p a: a, b: b # prints {:a=>1, :b=>2}
```
But – as we all know – it's also possible _without_ parentheses, i.e.
```ruby
a, b = [1, 2]
p a: a , b: b #=> {:a=>1, :b=>2}
```
This also applies to block arguments when yielding multiple values vs. yielding a single array:
```ruby
def foo
yield 1, 2
end
def bar
yield [1, 2]
end
foo { |a, b| p a: a, b: b }
#=> {:a=>1, :b=>2}
bar { |a, b| p a: a, b: b }
#=> {:a=>1, :b=>2}
```
In both cases, parentheses are optional.
This implicit array decomposition could be quite surprising for newcomers. The documentation should cover it.
--
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>