summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-26 20:14:49 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-26 20:14:49 +0000
commit5768a4a7e051963db769b5aafe8aadc6bc97f867 (patch)
tree79a9b2415c1b172bd1d5deac9ef2e8e6a6732780 /test/ruby/test_array.rb
parentcd246ff2545cd5399e98ff93eda29ba57e44cc85 (diff)
* array.c: Fix rdoc for Array#delete [#7437]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r--test/ruby/test_array.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 6c447c2626..6c7f920d79 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -598,6 +598,14 @@ class TestArray < Test::Unit::TestCase
a = @cls[*('cab'..'cat').to_a]
assert_equal(99, a.delete('cup') { 99 } )
assert_equal(@cls[*('cab'..'cat').to_a], a)
+
+ o = Object.new
+ def o.==(other); true; end
+ o2 = Object.new
+ def o2.==(other); true; end
+ a = @cls[1, o, o2, 2]
+ assert_equal(o2, a.delete(42))
+ assert_equal([1, 2], a)
end
def test_delete_at