From 827f4d653b056196acfec56b2a3b478019f61357 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Oct 2013 06:35:29 +0000 Subject: array.c: set class * array.c (rb_ary_uniq): set class of the return value to the receiver class. fix failure in TestArray#test_array_subclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 1 + 1 file changed, 1 insertion(+) diff --git a/array.c b/array.c index 509623c816..3998f60afc 100644 --- a/array.c +++ b/array.c @@ -4131,6 +4131,7 @@ rb_ary_uniq(VALUE ary) hash = ary_make_hash(ary); uniq = rb_hash_keys(hash); } + RBASIC_SET_CLASS(uniq, rb_obj_class(ary)); ary_recycle_hash(hash); return uniq; -- cgit v1.2.3