diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-30 06:56:18 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-30 06:56:18 +0000 |
commit | 3e9e2bd4ed14de63e8e18e779a5e8c1060ea5bcf (patch) | |
tree | 873570181bc80e61f01eca31effb94af645c188c /parse.y | |
parent | ad2c05f1c0947cbcc5dd86b00dda06bf4c391692 (diff) | |
download | ruby-3e9e2bd4ed14de63e8e18e779a5e8c1060ea5bcf.tar.gz |
* eval.c (rb_eval): NODE_XSTR should pass copy of literal string.
* array.c (rb_ary_update): a[n,m]=nil no longer works as element
deletion.
* enum.c (enum_sort_by): protect continuation jump in.
[ruby-dev:24642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -490,9 +490,9 @@ static void ripper_compile_error _((struct parser_params*, const char *fmt, ...) %type <node> f_arglist f_args f_optarg f_opt f_block_arg opt_f_block_arg %type <node> assoc_list assocs assoc kwargs undef_list backref string_dvar %type <node> for_var block_var opt_block_var block_par -%type <node> brace_block cmd_brace_block do_block lhs none +%type <node> brace_block cmd_brace_block do_block lhs none fitem %type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node -%type <id> fitem variable sym symbol operation operation2 operation3 +%type <id> fsym variable sym symbol operation operation2 operation3 %type <id> cname fname op f_rest_arg %type <num> f_norm_arg f_arg /*%%%*/ @@ -1511,10 +1511,21 @@ fname : tIDENTIFIER } ; -fitem : fname +fsym : fname | symbol ; +fitem : fsym + { + /*%%%*/ + $$ = NEW_LIT(ID2SYM($1)); + /*% + $$ = dispatch1(symbol_literal, $1); + %*/ + } + | dsym + ; + undef_list : fitem { /*%%%*/ |