Array#shift and Array#pop return wrong results in some cases
------------------------------------------------------------

                 Key: JRUBY-4586
                 URL: http://jira.codehaus.org/browse/JRUBY-4586
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Windows
    Affects Versions: JRuby 1.4
         Environment: Latest JRuby 1.5.0.dev
            Reporter: Vladimir Sizikov
             Fix For: JRuby 1.5


Consider the following:

{code}
array = [1, 2, 3, 4, 5]
array.shift
p array.shift(1)
p array.pop(3)
{code}

MRI returns:
[2]
[3, 4, 5]

JRuby returns:
[nil]
[nil, 2, 3]

Whoa! Fix is coming.

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