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
This commit is contained in:
nobu 2013-10-08 06:35:29 +00:00
parent 5014840140
commit 827f4d653b

View File

@ -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;