From: steve Date: 2008-03-05T09:07:12+09:00 Subject: yield/splat problem in 1.8.6 ------=_Part_3010_11557137.1204675638320 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hey guys, I just came across this weird behavior in 1.8. It works in 1.9 so I'm assuming it's a bug. Is this a known issue? def yield_array yield [1, 2] end def yield__yield_array yield_array {|a| yield(a) } end def yield__yield_array__with_splat yield_array {|*a| yield(*a) } end yield__yield_array {|args| p args } yield__yield_array__with_splat {|args| p args } # both as expected: # => [1, 2] yield__yield_array {|(a,b)| p a, b } # as expected: # => 1, 2 yield__yield_array__with_splat {|(a,b)| p a, b } # NOT AS EXPECTED !!?!?! # => [1, 2], nil - steve http://coderrr.wordpress.com ------=_Part_3010_11557137.1204675638320--