diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-08 06:35:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-08 06:35:29 +0000 |
commit | 827f4d653b056196acfec56b2a3b478019f61357 (patch) | |
tree | d25e8d4562331464151ff3e86c6e3c6f7b302096 /array.c | |
parent | 5014840140ab6c048a2c0d22542000e6e35b2e1d (diff) |
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
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |