summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-08 06:35:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-08 06:35:29 +0000
commit827f4d653b056196acfec56b2a3b478019f61357 (patch)
treed25e8d4562331464151ff3e86c6e3c6f7b302096 /array.c
parent5014840140ab6c048a2c0d22542000e6e35b2e1d (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.c1
1 files changed, 1 insertions, 0 deletions
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;