hide iseq operand object for duphash. [Bug #15440]

* compile.c (compile_array): hide source Hash object.

* hash.c (rb_hash_resurrect): introduced to dup Hash object
  using rb_cHash.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2018-12-20 07:17:55 +00:00
parent fe8475d7df
commit 2a70f68c05
5 changed files with 14 additions and 9 deletions

View file

@ -461,7 +461,7 @@ duphash
()
(VALUE val)
{
val = rb_hash_dup(hash);
val = rb_hash_resurrect(hash);
}
/* if TOS is an array expand, expand it to num objects.