summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/array.c b/array.c
index 3998f60..7e8617b 100644
--- a/array.c
+++ b/array.c
@@ -4124,8 +4124,7 @@ rb_ary_uniq(VALUE ary)
return rb_ary_dup(ary);
if (rb_block_given_p()) {
hash = ary_make_hash_by(ary);
- uniq = ary_new(rb_obj_class(ary), RHASH_SIZE(hash));
- st_foreach(rb_hash_tbl_raw(hash), push_value, uniq);
+ uniq = rb_hash_values(hash);
}
else {
hash = ary_make_hash(ary);