ArrayIndexOutOfBoundsException at MatchData#begin for Strings with special 
characters
-------------------------------------------------------------------------------------

                 Key: JRUBY-6152
                 URL: https://jira.codehaus.org/browse/JRUBY-6152
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.6.4
         Environment: OSX Lion; Java 6; Ruby 1.9 compatible mode.
            Reporter: Dingding Ye
         Attachments: 
JRUBY_MatchData_raise_index_of_outbound_exception_with_special_characters.diff

For some strings with special characters, it will raise 
Java::JavaLang::ArrayIndexOutOfBoundsException while invoking MatchData#begin 
and MatchData#end.

For example, 


input = "TEXG»234"
re = /(.)(.)(\d+)(\d)/m

match = re.match(input)
match.begin(0)

Will raise Java::JavaLang::ArrayIndexOutOfBoundsException: 5
    org.jruby.RubyMatchData.updateCharOffset(RubyMatchData.java:124)
    org.jruby.RubyMatchData.begin19(RubyMatchData.java:479)

--
This message is automatically generated by JIRA.
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