diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-05 08:56:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-10-05 08:56:34 +0000 |
commit | 4aa8b47bb9a7ba33828b7a1b654a3c4ed1d8bdf9 (patch) | |
tree | d119d2d68c21cc5a0ca989297832ed8778c94595 | |
parent | 12c8c18f096722f5497f054edcf6c24435c5f879 (diff) | |
download | ruby-4aa8b47bb9a7ba33828b7a1b654a3c4ed1d8bdf9.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 21 |
2 files changed, 20 insertions, 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. @@ -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: |