aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-20 07:17:55 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-20 07:17:55 +0000
commit2a70f68c05118775da45e630a96e89f6f57ceb39 (patch)
tree9aeaa9cd0198e44b88fdba51609b1bce75041bf3 /hash.c
parentfe8475d7df29e5b4775272754ba1989ac9a842a4 (diff)
downloadruby-2a70f68c05118775da45e630a96e89f6f57ceb39.tar.gz
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 'hash.c')
-rw-r--r--hash.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 3809e017f2..3bba88adc7 100644
--- a/hash.c
+++ b/hash.c
@@ -1310,6 +1310,13 @@ rb_hash_dup(VALUE hash)
return ret;
}
+MJIT_FUNC_EXPORTED VALUE
+rb_hash_resurrect(VALUE hash)
+{
+ VALUE ret = hash_dup(hash, rb_cHash, 0);
+ return ret;
+}
+
static void
rb_hash_modify_check(VALUE hash)
{