Ustr#endsWith causes exception
------------------------------

                 Key: JRUBY-881
                 URL: http://jira.codehaus.org/browse/JRUBY-881
             Project: JRuby
          Issue Type: Bug
          Components: Miscellaneous
    Affects Versions: JRuby 0.9.9
            Reporter: Wes Nakamura
            Assignee: Thomas E Enebo
            Priority: Minor
         Attachments: testUstr.java

Calling #endsWith with certain strings/Ustrs (in this case with trailing \r's) 
causes an exception.

The attached java file is in utf-8 and needs to be compiled with "-encoding 
utf-8".

{noformat}
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10
        at org.jruby.util.string.Ustr.nextChar(Ustr.java:450)
        at org.jruby.util.string.Ustr.strcmp(Ustr.java:783)
        at org.jruby.util.string.Ustr.endsWith(Ustr.java:1008)
        at org.jruby.util.string.Ustr.endsWith(Ustr.java:1018)
        at testUstr.main(testUstr.java:10)
{noformat}


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