summaryrefslogtreecommitdiff
path: root/bootstraptest/test_method.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-17 10:18:39 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-17 10:18:39 +0000
commit021f166509dfead5f1de67651af60de43242365c (patch)
treeb5a3c4638cb093e0d910f621e2cd15373caef874 /bootstraptest/test_method.rb
parentbecd789625323ef37c16829b8f87153f832a7fa4 (diff)
* compile.c (iseq_compile_each): fix return value of obj[a,*b]=c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_method.rb')
-rw-r--r--bootstraptest/test_method.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index f015efd..2baf335 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -402,6 +402,10 @@ m(1,2,*ary,&b)
$result
}
+# aset and splat
+assert_equal '4', %q{class Foo;def []=(a,b,c,d);end;end;Foo.new[1,*a=[2,3]]=4}
+assert_equal '4', %q{class Foo;def []=(a,b,c,d);end;end;def m(&blk)Foo.new[1,*a=[2,3],&blk]=4;end;m{}}
+
# post test
assert_equal %q{[1, 2, :o1, :o2, [], 3, 4, NilClass, nil, nil]}, %q{
def m(m1, m2, o1=:o1, o2=:o2, *r, p1, p2, &b)