mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* compile.c (iseq_compile_each): drop unused ARGSCAT results.
fix [ruby-dev:41933], [Bug #3658] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5274f89201
commit
50b5049921
3 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Aug 5 19:51:21 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* compile.c (iseq_compile_each): drop unused ARGSCAT results.
|
||||||
|
fix [ruby-dev:41933], [Bug #3658]
|
||||||
|
|
||||||
Thu Aug 5 18:36:11 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Aug 5 18:36:11 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* complex.c (nucomp_marshal_load): should check the argument.
|
* complex.c (nucomp_marshal_load): should check the argument.
|
||||||
|
|
|
@ -4521,8 +4521,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NODE_ARGSCAT:{
|
case NODE_ARGSCAT:{
|
||||||
COMPILE(ret, "argscat head", node->nd_head);
|
COMPILE_(ret, "argscat head", node->nd_head, poped);
|
||||||
COMPILE(ret, "argscat body", node->nd_body);
|
COMPILE_(ret, "argscat body", node->nd_body, poped);
|
||||||
|
if (poped) break;
|
||||||
ADD_INSN(ret, nd_line(node), concatarray);
|
ADD_INSN(ret, nd_line(node), concatarray);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,6 +273,7 @@ class TestRubyPrimitive < Test::Unit::TestCase
|
||||||
assert_equal 'abcd', $&
|
assert_equal 'abcd', $&
|
||||||
assert_equal 'xyz', $`
|
assert_equal 'xyz', $`
|
||||||
assert_equal 'efgabcdefg', $'
|
assert_equal 'efgabcdefg', $'
|
||||||
|
# '
|
||||||
assert_equal 'c', $+
|
assert_equal 'c', $+
|
||||||
|
|
||||||
/(?!)/ =~ 'xyzabcdefgabcdefg'
|
/(?!)/ =~ 'xyzabcdefgabcdefg'
|
||||||
|
@ -400,4 +401,9 @@ class TestRubyPrimitive < Test::Unit::TestCase
|
||||||
#assert_equal [0,1,2,3,4], [0, *a, 4]
|
#assert_equal [0,1,2,3,4], [0, *a, 4]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_concatarray_ruby_dev_41933
|
||||||
|
bug3658 = '[ruby-dev:41933]'
|
||||||
|
[0, *x=1]
|
||||||
|
assert_equal(1, x, bug3658)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue