String#insert behaves differently than MRI in some cases
--------------------------------------------------------

                 Key: JRUBY-1792
                 URL: http://jira.codehaus.org/browse/JRUBY-1792
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.x
         Environment: Latest JRuby 1.1b1 from trunk.
            Reporter: Vladimir Sizikov
            Priority: Minor
         Attachments: string-insert-typerror.patch

Consider the following example:

{noformat}
"abcd".insert(-10, :sym)
{noformat}

MRI 1.8.6, 1.9 report:
TypeError: can't convert Symbol into String

JRuby reports:
IndexError: index -5 out of range

This also leads to one Rubinius spec test failure.

The proposed (trivial) patch fixes the problem and the spec failure.

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