From: Yukihiro Matsumoto Date: 2010-04-27T11:32:23+09:00 Subject: [ruby-core:29803] Re: [Bug #1393] Multiple assignment does not call to_a but to_ary Hi, In message "Re: [ruby-core:29509] [Bug #1393] Multiple assignment does not call to_a but to_ary" on Wed, 14 Apr 2010 21:11:35 +0900, Yusuke Endoh writes: |Could you please answer this ticket? | |> 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. | |This is philosophical, but really significant bug against |convention of Ruby's type conversion, I think. I can't |ignore this without your response. OK, to_a means an explicit array conversion, so it should not be used for implicit conversion a in "*y = x". On the other hand, I consider "*x" as a form of explicit conversion, i.e. shorthand for "*(x.to_a)", so that the current 1.9 behavior is intentional. matz.