summaryrefslogtreecommitdiff
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r--test/ruby/test_array.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 3ab0895f8c..c231ecccd1 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -2283,4 +2283,11 @@ class TestArray < Test::Unit::TestCase
assert_include([4, 7], a.bsearch {|x| (2**100).coerce((1 - x / 4) * (2**100)).first })
end
+
+ def test_array_uniq_returns_same_class # [ruby-core:51792]
+ klass = Class.new(Array)
+ assert_equal klass, klass.new(2).uniq.class
+ assert_equal klass, klass.new(1).uniq.class
+ assert_equal klass, klass.new(0).uniq.class
+ end
end