https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112019-01-07T11:10:49ZRuby Issue Tracking SystemRuby master - Misc #15514: Add documentation for implicit array decompositionhttps://bugs.ruby-lang.org/issues/15514?journal_id=761052019-01-07T11:10:49Zshevegen (Robert A. Heiler)shevegen@gmail.com
<ul></ul><p>Agreed.</p> Ruby master - Misc #15514: Add documentation for implicit array decompositionhttps://bugs.ruby-lang.org/issues/15514?journal_id=762252019-01-10T16:43:08Zlugray (Lisa Ugray)
<ul></ul><p>If that's covered (and I agree it should be) it's also worth showing a case where they are not optional:</p>
<pre><code>def baz
yield [1, 2], 3
end
baz { |a, b, c| p a: a, b: b, c: c }
#=> {:a=>[1, 2], :b=>3, :c=>nil}
baz { |(a, b), c| p a: a, b: b, c: c }
#=> {:a=>1, :b=>2, :c=>3}
</code></pre>