mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_eval): fix evaluation order. [ruby-list:38431]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
12c8c18f09
commit
4aa8b47bb9
2 changed files with 20 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun Oct 5 17:56:30 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_eval): fix evaluation order. [ruby-list:38431]
|
||||
|
||||
Sun Oct 5 15:05:06 2003 akira yamada <akira@ruby-lang.org>
|
||||
|
||||
* test/uri/*: translated RUNIT to Test::Unit.
|
||||
|
@ -34,7 +38,7 @@ Sun Oct 5 11:23:00 2003 Nathaniel Talbott <ntalbott@ruby-lang.org>
|
|||
Sun Oct 5 11:14:00 2003 Nathaniel Talbott <ntalbott@ruby-lang.org>
|
||||
|
||||
* lib/rubyunit.rb: aliasing TestCase into the top level is
|
||||
problematic.
|
||||
problematic.
|
||||
|
||||
* lib/runit/assert.rb: fixed a couple of bugs caused by recent
|
||||
refactoring in Test::Unit.
|
||||
|
|
21
eval.c
21
eval.c
|
@ -2477,8 +2477,11 @@ rb_eval(self, n)
|
|||
|
||||
/* nodes for speed-up(literal match) */
|
||||
case NODE_MATCH2:
|
||||
result = rb_reg_match(rb_eval(self,node->nd_recv),
|
||||
rb_eval(self,node->nd_value));
|
||||
{
|
||||
VALUE l = rb_eval(self,node->nd_recv);
|
||||
VALUE r = rb_eval(self,node->nd_value);
|
||||
result = rb_reg_match(l, r);
|
||||
}
|
||||
break;
|
||||
|
||||
/* nodes for speed-up(literal match) */
|
||||
|
@ -2929,13 +2932,19 @@ rb_eval(self, n)
|
|||
break;
|
||||
|
||||
case NODE_ARGSCAT:
|
||||
result = rb_ary_concat(rb_eval(self, node->nd_head),
|
||||
splat_value(rb_eval(self, node->nd_body)));
|
||||
{
|
||||
VALUE args = rb_eval(self, node->nd_head);
|
||||
result = rb_ary_concat(args,
|
||||
splat_value(rb_eval(self, node->nd_body)));
|
||||
}
|
||||
break;
|
||||
|
||||
case NODE_ARGSPUSH:
|
||||
result = rb_ary_push(rb_ary_dup(rb_eval(self, node->nd_head)),
|
||||
rb_eval(self, node->nd_body));
|
||||
{
|
||||
VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
|
||||
result = rb_ary_push(args,
|
||||
rb_eval(self, node->nd_body));
|
||||
}
|
||||
break;
|
||||
|
||||
case NODE_ATTRASGN:
|
||||
|
|
Loading…
Reference in a new issue