diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-05 17:11:45 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-05 17:11:45 +0000 |
commit | 4545cd983e8ca746576f237c302ed98cc320df73 (patch) | |
tree | 2b42887f15e4f43afc9ee9c6e40f6b3606b9a14c /bootstraptest/test_literal.rb | |
parent | 81a5be6809e5895584951def32d9a9508616daf8 (diff) | |
download | ruby-4545cd983e8ca746576f237c302ed98cc320df73.tar.gz ruby-4545cd983e8ca746576f237c302ed98cc320df73.tar.xz ruby-4545cd983e8ca746576f237c302ed98cc320df73.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@12707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_literal.rb')
-rw-r--r-- | bootstraptest/test_literal.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb index 2ef47a5c2..76963962b 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' |