diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-20 07:17:55 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-20 07:17:55 +0000 |
commit | 2a70f68c05118775da45e630a96e89f6f57ceb39 (patch) | |
tree | 9aeaa9cd0198e44b88fdba51609b1bce75041bf3 /compile.c | |
parent | fe8475d7df29e5b4775272754ba1989ac9a842a4 (diff) |
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
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -4026,8 +4026,7 @@ compile_array(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node_ro hash = rb_hash_new_with_size(RARRAY_LEN(ary) / 2); rb_hash_bulk_insert(RARRAY_LEN(ary), RARRAY_CONST_PTR_TRANSIENT(ary), hash); - rb_hash_freeze(hash); - iseq_add_mark_object_compile_time(iseq, hash); + iseq_add_mark_object_compile_time(iseq, rb_obj_hide(hash)); ADD_INSN1(ret, line, duphash, hash); } } |