summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-12 10:42:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-12 10:42:36 +0000
commite52da919872f8cf71c90a27b470cef724204eece (patch)
tree2d425228fcba503e2f0a82726548f477cefc5da0 /insns.def
parent48149dff328079a25b9f17d47999a513b14389c6 (diff)
* compile.c (compile_array_, defined_expr, iseq_compile_each): hide
and freeze internal literal objects, to prevent from modifying. [ruby-dev:37959] * iseq.c (insn_operand_intern): copy internal literal objects. * insns.def (putstring, duparray): ditto. * string.c (rb_str_replace): exported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def4
1 files changed, 2 insertions, 2 deletions
diff --git a/insns.def b/insns.def
index cd779d1393..4eef8f64fa 100644
--- a/insns.def
+++ b/insns.def
@@ -373,7 +373,7 @@ putstring
()
(VALUE val)
{
- val = rb_str_new3(str);
+ val = rb_str_replace(rb_str_new(0, 0), str);
}
/**
@@ -460,7 +460,7 @@ duparray
()
(VALUE val)
{
- val = rb_ary_dup(ary);
+ val = rb_ary_replace(rb_ary_new2(0), ary);
}
/**