Skip to content

Commit

Permalink
array.c: set class
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Oct 8, 2013
1 parent 5014840 commit 827f4d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions array.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 827f4d6

Please sign in to comment.