From: Yukihiro Matsumoto Date: 2006-10-09T21:12:07+09:00 Subject: Re: [ruby-cvs:18323] ruby: * eval.c (splat_value): use "to_splat" instead of "to_ary" to Hi, In message "Re: [ruby-cvs:18323] ruby: * eval.c (splat_value): use "to_splat" instead of "to_ary" to" on Mon, 9 Oct 2006 10:21:23 +0900, Dave Burt writes: |Matz, I don't understand why "to_a was too general." What's wrong with |splatting based on to_a? I see an analogy with block-calling (&) with |to_proc. | |Are you saying this shouldn't work (with hashes or other enumerables)? | | x, y = *{1 => 2, 3 => 4} #=> [[1, 2], [3, 4]] It should be x={1 => 2, 3 => 4}, y=nil, I think, and 1.9 behave so. |Or would Enumerable's to_splat do the same as to_a; in which case, what |is the usefulness of the added flexibility? No. Enumerable does not have to_splat. matz.