[1.9] Symbol with empty string is allowed
-----------------------------------------
Key: JRUBY-4836
URL: http://jira.codehaus.org/browse/JRUBY-4836
Project: JRuby
Issue Type: Bug
Components: Parser, Ruby 1.9
Affects Versions: JRuby 1.5
Environment: github trunk
Reporter: Hiro Asari
Assignee: Thomas E Enebo
In 1.9, symbol with empty string is allowed.
{noformat}
$ ruby1.9 -v -e 'p :""'
ruby 1.9.3dev (2010-05-26 trunk 28028) [x86_64-darwin10.3.0]
:""
$ jruby --1.9 -v -e 'p :""'
jruby 1.6.0.dev (ruby 1.9.2dev trunk -1) (2010-05-29 02ed9ff) (Java HotSpot(TM)
64-Bit Server VM 1.6.0_20) [x86_64-java]
:1: -e:1: empty symbol literalp :"" (SyntaxError)
^
{noformat}
Note that the parser's error message is not quite in line with what MRI gives
in 1.8 mode (this is a minor issue)
{noformat}
[system]:~ $ ruby -v -e 'p :""'
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]
-e:1: empty symbol literal
[system]:~ $ jruby -v -e 'p :""'
jruby 1.6.0.dev (ruby 1.8.7 patchlevel 249) (2010-05-29 02ed9ff) (Java
HotSpot(TM) 64-Bit Server VM 1.6.0_20) [x86_64-java]
:1: -e:1: empty symbol literal p :"" (SyntaxError)
^
{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