Eric Wong <normalperson / yhbt.net> wrote:
> I am testing this, it looks like GC is confused by EMBED_FLAG being
> set and having ->ntbl:
> 
> --- a/hash.c
> +++ b/hash.c
> @@ -866,7 +866,8 @@ rb_hash_rehash(VALUE hash)
>      rb_hash_modify_check(hash);
>      if (!RHASH(hash)->ntbl)
>          return hash;
> -    tmp = hash_alloc(0);
> +    tmp = rb_hash_new();

Btw, I just noticed this reverts r43975.  I must say I don't understand why
r43975 was made, actually.  Bug #9187 is fixed by several commits, but I was
confused by the use of 0 as klass...
(commit 437b8bc53b25c3c2ac751db816dc1076d8c6957f)

> +    explode(tmp);
>      tbl = st_init_table_with_size(RHASH(hash)->ntbl->type, RHASH(hash)->ntbl->num_entries);
>      RHASH(tmp)->ntbl = tbl;