diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | parse.y | 9 |
2 files changed, 7 insertions, 7 deletions
@@ -1,7 +1,10 @@ -Fri Jul 13 11:09:38 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> +Fri Jul 13 11:16:25 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (program, stmt, primary): reduced duplicated code. + * parse.y (dsym): convert also literals containing NUL to + symbol. + Fri Jul 13 10:33:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * array.c (rb_ary_flatten_bang): check argument if valid @@ -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; |