summaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-03 19:11:49 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-03 19:11:49 +0000
commit9718767ac63946f463bda58fd499b263fc55690d (patch)
tree4afa1ee916597c6a307dc3bc90322792c077ec83 /bootstraptest
parent82733707f1aa3990ad2b7b80d430ef614284340f (diff)
downloadruby-9718767ac63946f463bda58fd499b263fc55690d.tar.gz
ruby-9718767ac63946f463bda58fd499b263fc55690d.tar.xz
ruby-9718767ac63946f463bda58fd499b263fc55690d.zip
* compile.c (compile_array): ignore NODE_ZARRAY.
[ruby-dev:31110] * bootstraptest/test_method.rb: add a test for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_method.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index c95eec175..7f20bf5a9 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -336,6 +336,21 @@ assert_equal '[[:ok1, :foo], [:ok2, :foo, :bar]]',
$ary
}
+# with
+assert_equal '[:ok1, [:ok2, 11]]', %q{
+ class C
+ def []
+ $ary << :ok1
+ 10
+ end
+ def []=(a)
+ $ary << [:ok2, a]
+ end
+ end
+ $ary = []
+ C.new[]+=1
+ $ary
+}
# splat and block arguments
assert_equal %q{[[[:x, :y, :z], NilClass], [[1, :x, :y, :z], NilClass], [[1, 2, :x, :y, :z], NilClass], [[:obj], NilClass], [[1, :obj], NilClass], [[1, 2, :obj], NilClass], [[], Proc], [[1], Proc], [[1, 2], Proc], [[], Proc], [[1], Proc], [[1, 2], Proc], [[:x, :y, :z], Proc], [[1, :x, :y, :z], Proc], [[1, 2, :x, :y, :z], Proc]]}, %q{