From: Robert Dober Date: 2007-08-18T19:48:18+09:00 Subject: Bug in select? Hi I was just testing Labrador with JRuby when JRuby failed a test MR passed, after some investigation I do have the feeling that JRuby is correct and MR is not. Could someone tell me if I am wrong? Here goes what seems quite normal to me: 510/9 > ruby -e '{:a=>42,:b=>46}.each{|x| p x}' [:b, 46] [:a, 42] robert@PC:/cygdrive/d/dober 12:32:01 511/10 > jruby -e '{:a=>42,:b=>46}.each{|x| p x}' [:a, 42] [:b, 46] robert@PC:/cygdrive/d/dober 12:32:06 512/11 > ruby -e '{:a=>42,:b=>46}.each{|*x| p x}' [[:b, 46]] [[:a, 42]] robert@PC:/cygdrive/d/dober 12:32:14 513/12 > jruby -e '{:a=>42,:b=>46}.each{|*x| p x}' [[:a, 42]] [[:b, 46]] map has the same block parameter passing semantics as each of course 516/15 > ruby -e '{:a=>42,:b=>46}.map{|*x| p x}' [[:b, 46]] [[:a, 42]] robert@PC:/cygdrive/d/dober 12:46:17 517/16 > jruby -e '{:a=>42,:b=>46}.map{|*x| p x}' [[:a, 42]] [[:b, 46]] but now look at select please 518/17 > ruby -e '{:a=>42,:b=>46}.select{|*x| p x}' vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv [:b, 46] [:a, 42] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ robert@PC:/cygdrive/d/dober 12:47:20 519/18 > jruby -e '{:a=>42,:b=>46}.select{|*x| p x}' [[:a, 42]] [[:b, 46]] Is it just me or is it really broken? Thx in advance. Robert -- I'm an atheist and that's it. I believe there's nothing we can know except that we should be kind to each other and do what we can for other people. -- Katharine Hepburn