diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-30 21:00:04 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-30 21:00:04 +0000 |
commit | a924b1768f2144cea4e6201245e3ee57aedc5318 (patch) | |
tree | 324d22c93bb945a2985be645c0a95e3e9c0f7bf3 /test/ruby/test_array.rb | |
parent | a6d0cd442b43e0ffea117bdf7eb900b195c1f687 (diff) |
Add ML Reference and a test for r30736 [ruby-core:34997]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r-- | test/ruby/test_array.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index e6a438cd73..1aa8c54f5c 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1456,6 +1456,12 @@ class TestArray < Test::Unit::TestCase assert_raise(ArgumentError) { a.uniq!(1) } assert_raise(ArgumentError) { f.uniq!(1) } assert_raise(RuntimeError) { f.uniq! } + + assert_nothing_raised do + a = [ {c: "b"}, {c: "r"}, {c: "w"}, {c: "g"}, {c: "g"} ] + a.sort_by!{|e| e[:c]} + a.uniq! {|e| e[:c]} + end end def test_uniq_bang_with_block |