diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-13 02:16:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-13 02:16:27 +0000 |
commit | b1d5c752fbafe0433508e6719d576072fd938e01 (patch) | |
tree | 752643eb9d7d0dcc855cafbc6563134d3139db00 /parse.y | |
parent | 6dcf9f16ccf2523e9473b10d8b8f308013913c57 (diff) | |
download | ruby-b1d5c752fbafe0433508e6719d576072fd938e01.tar.gz |
* parse.y (dsym): convert also literals containing NUL to
symbol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -3864,12 +3864,9 @@ dsym : tSYMBEG xstring_contents tSTRING_END yyerror("empty symbol literal"); break; } - if (strlen(RSTRING_PTR(lit)) == RSTRING_LEN(lit)) { - $$->nd_lit = ID2SYM(rb_intern(RSTRING_PTR($$->nd_lit))); - nd_set_type($$, NODE_LIT); - break; - } - /* fall through */ + $$->nd_lit = ID2SYM(rb_intern2(RSTRING_PTR(lit), RSTRING_LEN(lit))); + nd_set_type($$, NODE_LIT); + break; default: $$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$)); break; |