mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* hash.c (rb_hash_to_a): specify array capa.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bfbe1b9b31
commit
8efbe96231
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun Dec 1 14:37:20 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||
|
||||
* hash.c (rb_hash_to_a): specify array capa.
|
||||
|
||||
Sun Dec 1 14:15:36 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||
|
||||
* hash.c (rb_hash_rehash): fix to free new st_table when exception
|
||||
|
|
2
hash.c
2
hash.c
|
@ -1606,7 +1606,7 @@ rb_hash_to_a(VALUE hash)
|
|||
{
|
||||
VALUE ary;
|
||||
|
||||
ary = rb_ary_new();
|
||||
ary = rb_ary_new_capa(RHASH_SIZE(hash));
|
||||
rb_hash_foreach(hash, to_a_i, ary);
|
||||
OBJ_INFECT(ary, hash);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue