Hash#select block parameter semantics are not cRuby compatible
--------------------------------------------------------------
Key: JRUBY-1280
URL: http://jira.codehaus.org/browse/JRUBY-1280
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.0.0
Environment: Linux trunk, cygwin 1.0.0 and Linux 1.0.0
Reporter: Robert Dober
Priority: Minor
Attachments: test-hash-select.rb
The following behavior of cRuby might seem strange and I have therefore seeked
confirmation on ruby-core, which I got from Matz.
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/11930 and
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/11931
I therefore consider the following behavior a bug:
[EMAIL PROTECTED]:~/SW/trunk/jruby/bin 18:06:45
518/19 > ./jruby -v
ruby 1.8.5 (2007-06-07 rev 3841) [i386-jruby1.0]
[EMAIL PROTECTED]:~/SW/trunk/jruby/bin 18:06:50
519/20 > ./jruby -e '{:a=>1}.select{|*x| p x}'
vvvvvvv
[[:a, 1]]
^^^^^^^
[EMAIL PROTECTED]:~/SW/trunk/jruby/bin 18:06:56
520/21 > ruby -e '{:a=>1}.select{|*x| p x}'
[:a, 1]
Sorry for the testcase it is *not* a JUnit test it is a Ruby test/unit test, I
provide it nevertheless in the hope it is useful.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email