diff options
-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: |