From: Tomas Matousek Date: 2010-08-12T00:41:00+09:00 Subject: [ruby-core:31676] [Backport #3680] Splatting calls to_ary instead of to_a in some cases Backport #3680: Splatting calls to_ary instead of to_a in some cases http://redmine.ruby-lang.org/issues/show/3680 Author: Tomas Matousek Status: Open, Priority: Normal Category: core In some cases to_ary is called to splat an array. Shouldn't to_a be always called? class C def respond_to? name p name false end end p [1,*C.new] p(*C.new) x,y = C.new p x,y proc {|a,b| p [a,b] }.call(C.new) ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] :to_a [1, #] :to_a # :to_ary # nil :to_ary [#, nil] ---------------------------------------- http://redmine.ruby-lang.org