JRuby cannot parse a magic comment like #-*- mode: ruby; -*- ------------------------------------------------------------
Key: JRUBY-5445 URL: http://jira.codehaus.org/browse/JRUBY-5445 Project: JRuby Issue Type: Bug Components: Parser Affects Versions: JRuby 1.6RC1 Environment: $ uname -a Darwin MacBook-Pro.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 $ ruby --version jruby 1.6.0.RC1 (ruby 1.9.2 trunk 136) (2011-01-10 769f847) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java] Reporter: Kiyoka Nishiyama Assignee: Thomas E Enebo Priority: Minor Attachments: t.rb JRuby can't parse this program file. {code:title=t.rb|borderStyle=solid} #-*- mode: ruby; -*- p "test" {code} Error message: {code:shell} $ ruby t.rb ByteList.java:1244:in `charAt': java.lang.ArrayIndexOutOfBoundsException: -1 from RubyYaccLexer.java:700:in `magicCommentMarker' from RubyYaccLexer.java:738:in `parseMagicComment' from RubyYaccLexer.java:802:in `readComment' from RubyYaccLexer.java:997:in `yylex' from RubyYaccLexer.java:312:in `nextToken' from Ruby19Parser.java:1416:in `yyparse' from Ruby19Parser.java:1367:in `yyparse' from Ruby19Parser.java:4242:in `parse' from Parser.java:112:in `parse' from Parser.java:94:in `parse' from Ruby.java:2317:in `parseFile' from Ruby.java:2322:in `parseFile' from Ruby.java:447:in `parseFromMain' from Ruby.java:405:in `runFromMain' from Main.java:304:in `run' from Main.java:144:in `run' from Main.java:113:in `main' {code} -- 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