EOF while parsing identifier in $KCODE="s" raises ArrayIndexOutOfBoundsException
--------------------------------------------------------------------------------

                 Key: JRUBY-5306
                 URL: http://jira.codehaus.org/browse/JRUBY-5306
             Project: JRuby
          Issue Type: Bug
          Components: Parser
    Affects Versions: JRuby 1.5.6
         Environment: jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 
9cf97c3) (OpenJDK 64-Bit Server VM 1.6.0_20) [amd64-java]
            Reporter: Hiroshi Nakamura
            Assignee: Hiroshi Nakamura


{noformat}
0% jruby15 -Ks -ve 'eval("$a")'
jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) (OpenJDK 64-Bit 
Server VM 1.6.0_20) [amd64-java]
BaseSJISEncoding.java:47:in `codeToMbcLength': 
java.lang.ArrayIndexOutOfBoundsException: -1
        from RubyYaccLexer.java:466:in `isMultiByteChar'
        from RubyYaccLexer.java:456:in `isIdentifierChar'
        from RubyYaccLexer.java:1062:in `getIdentifier'
        from RubyYaccLexer.java:1351:in `dollar'
        from RubyYaccLexer.java:1023:in `yylex'
        from RubyYaccLexer.java:293:in `advance'
        from DefaultRubyParser.java:1380:in `yyparse'
        from DefaultRubyParser.java:1332:in `yyparse'
        from DefaultRubyParser.java:3986:in `parse'
        from Parser.java:111:in `parse'
        from Parser.java:82:in `parse'
        from Parser.java:74:in `parse'
        from Ruby.java:2301:in `parseEval'
        from ASTInterpreter.java:96:in `evalWithBinding'
        from RubyKernel.java:1045:in `eval'
        from 
org/jruby/RubyKernel$s_method_0_3$RUBYFRAMEDINVOKER$eval.gen:65535:in `call'
        from DynamicMethod.java:190:in `call'
        from DynamicMethod.java:186:in `call'
        from CachingCallSite.java:309:in `cacheAndCall'
        from CachingCallSite.java:148:in `call'
        from -e:1:in `__file__'
        from -e:-1:in `load'
        from Ruby.java:690:in `runScript'
        from Ruby.java:573:in `runNormally'
        from Ruby.java:416:in `runFromMain'
        from Main.java:286:in `run'
        from Main.java:128:in `run'
        from Main.java:97:in `main'
{noformat}

Typically, "jruby -S irb" then "$KCODE='s'" raises the exception.

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