mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 55896: [Backport #12614]
* id_table.c (hash_table_extend): should not shrink the table than the previous capacity. [ruby-core:76534] [Bug #12614] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ea5e22d102
commit
2d17694de7
3 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Aug 27 03:51:23 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* id_table.c (hash_table_extend): should not shrink the table than
|
||||
the previous capacity. [ruby-core:76534] [Bug #12614]
|
||||
|
||||
Sat Aug 27 03:37:49 2016 Kazuki Yamaguchi <k@rhe.jp>
|
||||
|
||||
* ext/openssl/ossl_config.c: fix memory leak.
|
||||
|
|
|
@ -1302,6 +1302,9 @@ hash_table_extend(struct hash_id_table* tbl)
|
|||
int i;
|
||||
item_t* old;
|
||||
struct hash_id_table tmp_tbl = {0, 0, 0};
|
||||
if (new_cap < tbl->capa) {
|
||||
new_cap = round_capa(tbl->used + (tbl->used >> 1));
|
||||
}
|
||||
tmp_tbl.capa = new_cap;
|
||||
tmp_tbl.items = ZALLOC_N(item_t, new_cap);
|
||||
for (i = 0; i < tbl->capa; i++) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define RUBY_VERSION "2.3.2"
|
||||
#define RUBY_RELEASE_DATE "2016-08-27"
|
||||
#define RUBY_PATCHLEVEL 179
|
||||
#define RUBY_PATCHLEVEL 180
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2016
|
||||
#define RUBY_RELEASE_MONTH 8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue