Improper SyntaxError#message for unexpected token
-------------------------------------------------
Key: JRUBY-4532
URL: http://jira.codehaus.org/browse/JRUBY-4532
Project: JRuby
Issue Type: Bug
Components: Parser
Affects Versions: JRuby 1.4
Reporter: Hiroshi Nakamura
Assignee: Thomas E Enebo
Attachments: syntax_error_message_fix.diff
", unexpected end-of-file" should be "syntax error, unexpected end-of-file" as
same as CRuby.
{noformat}
0% /home/nahi/java/jruby-1.4.0/bin/jruby -ve '1+'
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3)
(Java HotSpot(TM) Client VM 1.6.0_16) [i386-java]
:1: -e:2: , unexpected end-of-file (SyntaxError)
1% /home/nahi/git/jruby-master/bin/jruby -ve '1+'
jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2010-02-02 efab993)
(Java HotSpot(TM) Client VM 1.6.0_16) [i386-java]
:1: -e:2: syntax error, unexpected end-of-file (SyntaxError)
1%
{noformat}
Attached is the patch. CAUTION: I didn't run generate_parser + jay against this
fix. The latest jay at
http://www.cs.rit.edu/~ats/projects/lp/doc/jay/package-summary.html generates
uncompilable sources for me.
This patch fixes the following test failure of JRUBY-3786.
{noformat}
21) Failure:
test_self_load_specification_syntax_error(TestGemSourceIndex)
[./test/test_gem_source_index.rb:178]:
Expected /syntax error/ to match "WARNING:
/private/var/folders/V5/V5W2zlDQHPy94tAnCC5f6U+++TI/-Tmp-
/test_rubygems_18593/gemhome/specifications/a-1.gemspec:
1: , unexpected end-of-file\n\n1 +\n ^\nWARNING: 1 +\n".
{noformat}
--
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