From 41eb48b88d90936c0055aecb855752ed6e15b7fc Mon Sep 17 00:00:00 2001 From: glass Date: Tue, 8 Oct 2013 04:56:50 +0000 Subject: [PATCH] * array.c (rb_ary_uniq): use rb_hash_keys(). * internal.h: define rb_hash_keys() as internal API. * hash.c (rb_hash_keys): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ array.c | 8 +------- hash.c | 2 +- internal.h | 1 + 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fb5ac6e0b..e46ff49664 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Oct 8 13:53:21 2013 Masaki Matsushita + + * array.c (rb_ary_uniq): use rb_hash_keys(). + + * internal.h: define rb_hash_keys() as internal API. + + * hash.c (rb_hash_keys): ditto. + Tue Oct 8 10:56:39 2013 KOSAKI Motohiro * cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn't diff --git a/array.c b/array.c index 76289f41f6..e94eff5b0d 100644 --- a/array.c +++ b/array.c @@ -4130,13 +4130,7 @@ rb_ary_uniq(VALUE ary) } else { hash = ary_make_hash(ary); - uniq = ary_new(rb_obj_class(ary), RHASH_SIZE(hash)); - for (i=0; i