mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
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
This commit is contained in:
parent
a6d0cd442b
commit
a924b1768f
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue