[1.9] splat with nil produces incompatible with MRI results
-----------------------------------------------------------

                 Key: JRUBY-4584
                 URL: http://jira.codehaus.org/browse/JRUBY-4584
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Ruby 1.9
    Affects Versions: JRuby 1.4
         Environment: Latest jruby
            Reporter: Vladimir Sizikov


Consider the following:

{code}
p [*nil]
p [1, *nil]
{code}

MRI 1.9.2 will print:
{noformat}
ruby 1.9.2dev (2010-02-10 trunk 26632) [i386-mingw32]
[]
[1]
{noformat}

JRuby in 1.9 mode will print:
{noformat}
jruby 1.5.0.dev (ruby 1.9.2dev trunk 24787) (2010-02-23 2a8097f) (Java 
HotSpot(TM) Client VM 1.6.0_18) [x86-java]
[]
[1, nil]
{noformat}

This will lead to the following funny script (tribute to why): 
http://gist.github.com/311762 to produce different results under JRuby, 
compared to MRI 1.9.

-- 
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


Reply via email to