aboutsummaryrefslogtreecommitdiffstats
path: root/bootstraptest/test_literal.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-05 17:11:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-05 17:11:45 +0000
commitb9171a73c4f0d212b723e0160859ab69b89b3339 (patch)
tree2b42887f15e4f43afc9ee9c6e40f6b3606b9a14c /bootstraptest/test_literal.rb
parent0d0ef6eccc50ed95d8babcf5381426c70c4d4b30 (diff)
downloadruby-b9171a73c4f0d212b723e0160859ab69b89b3339.tar.gz
* insns.def: fix to invoke nil.to_splat on NODE_ARGSCAT.
[ruby-dev:31138]. * bootstraptest/test_literal.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_literal.rb')
-rw-r--r--bootstraptest/test_literal.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb
index 2ef47a5c2c..76963962b4 100644
--- a/bootstraptest/test_literal.rb
+++ b/bootstraptest/test_literal.rb
@@ -113,6 +113,8 @@ assert_equal '1', 'a = [obj = Object.new]; a.size'
assert_equal 'true', 'a = [obj = Object.new]; a[0] == obj'
assert_equal '5', 'a = [1,2,3]; a[1] = 5; a[1]'
assert_equal 'bar', '[*:foo];:bar'
+assert_equal '[1, 2]', 'def nil.to_splat; [2]; end; [1, *nil]'
+assert_equal '[1, 2]', 'def nil.to_splat; [1, 2]; end; [*nil]'
# hash
assert_equal 'Hash', '{}.class'