mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* hash.c (rb_hash_keys): set array capa to RHASH_SIZE().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3c9e6f1e62
commit
c459495c77
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Jul 11 23:54:45 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||||
|
|
||||||
|
* hash.c (rb_hash_keys): set array capa to RHASH_SIZE().
|
||||||
|
|
||||||
Thu Jul 11 21:30:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Jul 11 21:30:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* win32/win32.c (rb_w32_pow): undef pow to get rid of infinite
|
* win32/win32.c (rb_w32_pow): undef pow to get rid of infinite
|
||||||
|
|
2
hash.c
2
hash.c
|
@ -1651,7 +1651,7 @@ rb_hash_keys(VALUE hash)
|
||||||
{
|
{
|
||||||
VALUE ary;
|
VALUE ary;
|
||||||
|
|
||||||
ary = rb_ary_new();
|
ary = rb_ary_new_capa(RHASH_SIZE(hash));
|
||||||
rb_hash_foreach(hash, keys_i, ary);
|
rb_hash_foreach(hash, keys_i, ary);
|
||||||
|
|
||||||
return ary;
|
return ary;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue