Bug in AbstractEncoding?
------------------------

                 Key: JRUBY-4389
                 URL: http://jira.codehaus.org/browse/JRUBY-4389
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.4
         Environment: jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-03 6586) 
(Java HotSpot(TM) 64-Bit Server VM 1.6.0_17) [x86_64-java]
            Reporter: Kornelius Kalnbach


jruby -e '"\227\376"[/[^\W]\w/u]'

produces:

AbstractEncoding.java:50:in `isCodeCTypeInternal': 
java.lang.ArrayIndexOutOfBoundsException: -2
        from UnicodeEncoding.java:51:in `isCodeCType'
        from Encoding.java:430:in `isWord'
        from Encoding.java:435:in `isMbcWord'
        from ByteCodeMachine.java:937:in `opWord'
        from ByteCodeMachine.java:228:in `matchAt'
        from Matcher.java:293:in `matchCheck'
        from Matcher.java:466:in `search'
        from RubyRegexp.java:1384:in `search'
        from RubyString.java:3340:in `subpat'
        from RubyString.java:3258:in `op_aref'
        from org/jruby/RubyString$i_method_multi$RUBYINVOKER$op_aref.gen:-1:in 
`call'
        from CachingCallSite.java:310:in `cacheAndCall'
        from CachingCallSite.java:149:in `call'
        from -e:1:in `__file__'
        from -e:-1:in `load'
        from Ruby.java:628:in `runScript'
        from Ruby.java:550:in `runNormally'
        from Ruby.java:396:in `runFromMain'
        from Main.java:272:in `run'
        from Main.java:117:in `run'
        from Main.java:97:in `main'

I know it's a strange string, but JRuby should raise an exception on Ruby 
level, if any.
Confirmed by banzaiman on #jruby.

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