eval.c: use rb_ident_hash_new

* eval.c (hidden_identity_hash_new): use rb_ident_hash_new instead
  of funcall Hash#compare_by_id.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-08-10 01:07:57 +00:00
parent f23a72a656
commit 1d2d307c5c

3
eval.c
View File

@ -1088,9 +1088,8 @@ rb_mod_prepend(int argc, VALUE *argv, VALUE module)
static VALUE
hidden_identity_hash_new(void)
{
VALUE hash = rb_hash_new();
VALUE hash = rb_ident_hash_new();
rb_funcall(hash, rb_intern("compare_by_identity"), 0);
RBASIC_CLEAR_CLASS(hash); /* hide from ObjectSpace */
return hash;
}