From b9171a73c4f0d212b723e0160859ab69b89b3339 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 5 Jul 2007 17:11:45 +0000 Subject: * 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 --- bootstraptest/test_literal.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bootstraptest/test_literal.rb') 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' -- cgit v1.2.3