mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 01:54:00 +02:00
* test/ruby/test_array.rb (TestArray#test_splat): Add tests for a
recently introduced bug in array splatting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
957ce6574c
commit
f51983e848
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Nov 25 15:06:42 2009 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* test/ruby/test_array.rb (TestArray#test_splat): Add tests for a
|
||||||
|
recently introduced bug in array splatting.
|
||||||
|
|
||||||
Tue Nov 24 16:18:35 2009 Akinori MUSHA <knu@iDaemons.org>
|
Tue Nov 24 16:18:35 2009 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* ext/digest/lib/md5.rb, ext/digest/lib/sha1.rb: Add an
|
* ext/digest/lib/md5.rb, ext/digest/lib/sha1.rb: Add an
|
||||||
|
|
|
@ -1276,4 +1276,11 @@ class TestArray < Test::Unit::TestCase
|
||||||
def test_drop_while
|
def test_drop_while
|
||||||
assert_equal([3,4,5,0], [1,2,3,4,5,0].drop_while {|i| i < 3 })
|
assert_equal([3,4,5,0], [1,2,3,4,5,0].drop_while {|i| i < 3 })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_splat
|
||||||
|
a = [2,3]
|
||||||
|
assert_equal([1,2,3], [1, *a])
|
||||||
|
a = [2,3]
|
||||||
|
assert_equal([2,3], [*a])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue