Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser needs to handle encoding error properly #2151

Closed
headius opened this issue Nov 8, 2014 · 1 comment
Closed

Parser needs to handle encoding error properly #2151

headius opened this issue Nov 8, 2014 · 1 comment

Comments

@headius
Copy link
Member

headius commented Nov 8, 2014

Failing test:

TestException#test_errinfo_encoding_in_debug:
Java::OrgJcodingsException::EncodingException: invalid code point value
    org.jcodings.specific.BaseEUCJPEncoding.codeToMbcLength(BaseEUCJPEncoding.java:55)
    org.jcodings.specific.EUCJPEncoding.codeToMbcLength(EUCJPEncoding.java:24)
    org.jruby.lexer.yacc.RubyLexer.isMultiByteChar(RubyLexer.java:618)
    org.jruby.lexer.yacc.RubyLexer.getIdentifier(RubyLexer.java:1329)
    org.jruby.lexer.yacc.RubyLexer.identifier(RubyLexer.java:1736)
    org.jruby.lexer.yacc.RubyLexer.yylex(RubyLexer.java:1305)
    org.jruby.lexer.yacc.RubyLexer.nextToken(RubyLexer.java:396)
    org.jruby.parser.RubyParser.yyparse(RubyParser.java:1583)
    org.jruby.parser.RubyParser.yyparse(RubyParser.java:1534)
    org.jruby.parser.RubyParser.parse(RubyParser.java:5216)
    org.jruby.parser.Parser.parse(Parser.java:108)
    org.jruby.parser.Parser.parse(Parser.java:78)
    org.jruby.parser.Parser.parse(Parser.java:70)
    org.jruby.Ruby.parseEval(Ruby.java:2716)

I'm marking this beginner as well, since it may simply be a matter of capturing the exception and re-raising it appropriately.

Run with jruby test/mri/runner.rb ruby/test_exception.rb -n test_errinfo_encoding_in_debug.

@headius headius added the parser label Nov 8, 2014
@headius headius added this to the JRuby 9.0.0.0 milestone Nov 8, 2014
@enebo enebo modified the milestone: JRuby 9.0.0.0 Jul 14, 2015
@enebo enebo added this to the Invalid or Duplicate milestone Feb 19, 2016
@enebo
Copy link
Member

enebo commented Feb 19, 2016

Marking as duplicate of #3679. The crash here is now what should be happening. We are failing to make the error class before the actual test is executed.

@enebo enebo closed this as completed Feb 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants