Actions
Bug #1393
closedMultiple assignment does not call to_a but to_ary
ruby -v:
1.9.1p0, 1.9.2dev (2009-04-19 trunk 23210)
Backport:
Description
=begin
In Ruby 1.9, when Ruby is expecting an array and does not get one (for example in splat arguments), it calls the to_a method on the object.
For example, if x is not an array, "y = *x" tries to call x.to_a.
However, in multiple assignments, it does not try to call to_a but to_ary.
For example, "*y = x" tries to call x.to_ary.
Should not Ruby try to call to_a in both cases? It looks like a bug to me.
Is there a particular reason this was done?
=end
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0