diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-05 07:19:39 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-05 07:19:39 +0000 |
| commit | d8da6ee60e0a2fd6cd4d4fee0caccda333b8aaf9 (patch) | |
| tree | e8848119511789017b7c0dbf29f8cd37376737e5 /parse.y | |
| parent | 7f6e8dfb80ac0ed4f19f773117e16073ac3109f6 (diff) | |
| download | ruby-d8da6ee60e0a2fd6cd4d4fee0caccda333b8aaf9.tar.gz ruby-d8da6ee60e0a2fd6cd4d4fee0caccda333b8aaf9.tar.xz ruby-d8da6ee60e0a2fd6cd4d4fee0caccda333b8aaf9.zip | |
* variable.c (rb_mod_const_at): use hash table as internal
data. [new]
* variable.c (rb_mod_const_of): ditto.
* variable.c (rb_const_list): new function to convert internal
data (hash table) to array of strings.
* eval.c (rb_mod_s_constants): data handling scheme has changed.
* eval.c (rb_add_method): should not call rb_secure(), for
last_func may not be set.
* io.c (rb_io_ctl): ioctl should accept any integer within C long
range.
* marshal.c (r_object): wrong type check for modules.
* marshal.c (w_object): should not dump anonymous classes/modules.
* io.c (rb_open_file): use rb_file_sysopen_internal() if the 3rd
argument (permission flags) is given. [new, should be backported?]
* io.c (rb_io_mode_binmode): mode string (e.g. "r+") to flags to
open(2).
* eval.c (rb_eval): NODE_REXPAND expand an array of 1 element as
the element itself. [new, should be backported?]
* parse.y (ret_args): should treat "*[a]" in rhs expression as
"a", not "[a]".
* regex.c (re_compile_pattern): should push option modifier at the
right place.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -425,7 +425,7 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem } | lhs '=' mrhs_basic { - $$ = node_assign($1, $3); + $$ = node_assign($1, ret_args($3)); } | mlhs '=' mrhs { @@ -1146,7 +1146,7 @@ mrhs_basic : args ',' arg | tSTAR arg { value_expr($2); - $$ = $2; + $$ = NEW_RESTARGS($2); } primary : literal @@ -4671,6 +4671,9 @@ ret_args(node) rb_compile_error("block argument should not be given"); } } + if (nd_type(node) == NODE_RESTARGS) { + nd_set_type(node, NODE_REXPAND); + } return node; } |
