diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-30 17:20:48 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-30 17:20:48 +0000 |
commit | b822c8ae778834a3cd2c7b11181a97874e84b6a5 (patch) | |
tree | 52d2593a64356619b0c6e508ffb520e57a5df744 /parse.y | |
parent | 10ae06cfd67627244a670599ba60c3e00ffc433b (diff) | |
download | ruby-b822c8ae778834a3cd2c7b11181a97874e84b6a5.tar.gz ruby-b822c8ae778834a3cd2c7b11181a97874e84b6a5.tar.xz ruby-b822c8ae778834a3cd2c7b11181a97874e84b6a5.zip |
* parse.y (dsym): allow empty symbols. [ruby-core:15248]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -3868,8 +3868,7 @@ dsym : tSYMBEG xstring_contents tSTRING_END /*%%%*/ lex_state = EXPR_ENDARG; if (!($$ = $2)) { - $$ = NEW_NIL(); - yyerror("empty symbol literal"); + $$ = NEW_LIT(ID2SYM(rb_intern(""))); } else { VALUE lit; @@ -3880,10 +3879,6 @@ dsym : tSYMBEG xstring_contents tSTRING_END break; case NODE_STR: lit = $$->nd_lit; - if (RSTRING_LEN(lit) == 0) { - yyerror("empty symbol literal"); - break; - } $$->nd_lit = ID2SYM(rb_intern_str(lit)); nd_set_type($$, NODE_LIT); break; |