summaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-30 06:56:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-30 06:56:18 +0000
commit95cbad84ec6608fd88d3b6128bb7e812f01af75c (patch)
tree873570181bc80e61f01eca31effb94af645c188c /parse.y
parent196d35944013d732d213658c17d41617aaa86aa4 (diff)
downloadruby-95cbad84ec6608fd88d3b6128bb7e812f01af75c.tar.gz
ruby-95cbad84ec6608fd88d3b6128bb7e812f01af75c.tar.xz
ruby-95cbad84ec6608fd88d3b6128bb7e812f01af75c.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y17
1 files changed, 14 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 4b5c02774..51a37da65 100644
--- a/parse.y
+++ b/parse.y
@@ -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
{
/*%%%*/