Incorrect behavior of RubyMatchData updateCharOffset() and Strings with special characters ------------------------------------------------------------------------------------------
Key: JRUBY-6120 URL: https://jira.codehaus.org/browse/JRUBY-6120 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Affects Versions: JRuby 1.6.4 Environment: jruby 1.6.4 (ruby-1.9.2-p136) (2011-08-23 17ea768) (OpenJDK 64-Bit Server VM 1.7.0-internal) [darwin-x86_64-java] Reporter: Scott Lowe In Ruby 1.9 mode, an ArrayIndexOutOfBoundsException is thrown when special characters are used in Rails ERB templates. This bug relates to a similar resolved issue, JRUBY-5924. This bug report also uses the same gist to demonstrate the issue: https://gist.github.com/1080407 {code} mbp-scott:~ scott$ ruby -v jruby 1.6.4 (ruby-1.9.2-p136) (2011-08-23 17ea768) (OpenJDK 64-Bit Server VM 1.7.0-internal) [darwin-x86_64-java] mbp-scott:~ scott$ ruby test.rb RubyMatchData.java:137:in `updateCharOffset': java.lang.ArrayIndexOutOfBoundsException: 6 from RubyMatchData.java:479:in `begin19' from RubyMatchData$i$1$0$begin19.gen:65535:in `call' from CachingCallSite.java:312:in `cacheAndCall' from CachingCallSite.java:169:in `call' from test.rb:12:in `__file__' from test.rb:-1:in `load' from Ruby.java:679:in `runScript' from Ruby.java:672:in `runScript' from Ruby.java:579:in `runNormally' from Ruby.java:428:in `runFromMain' from Main.java:278:in `doRunFromMain' from Main.java:198:in `internalRun' from Main.java:164:in `run' from Main.java:148:in `run' from Main.java:128:in `main' mbp-scott:~ scott$ export JRUBY_OPTS=--1.8 mbp-scott:~ scott$ ruby test.rb 21 34 {code} -- 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