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 | dd7bcfc07259dcd4720e44dd8ebcf4910a1d9554 (patch) | |
tree | 52d2593a64356619b0c6e508ffb520e57a5df744 | |
parent | 1df7138a0d8e6c0c86572cb8c03059138e33aa9f (diff) | |
download | ruby-dd7bcfc07259dcd4720e44dd8ebcf4910a1d9554.tar.gz |
* parse.y (dsym): allow empty symbols. [ruby-core:15248]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | parse.y | 7 |
2 files changed, 5 insertions, 6 deletions
@@ -1,3 +1,7 @@ +Thu Jan 31 02:15:49 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * parse.y (dsym): allow empty symbols. [ruby-core:15248] + Thu Jan 31 00:01:51 2008 Tanaka Akira <akr@fsij.org> * io.c (select_internal): fix SEGV by `select [STDIN],nil,[STDIN]'. @@ -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; |