summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-19 23:15:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-19 23:15:03 +0000
commit247c77c99feb1e80df8f62216dd2d8b95e9de719 (patch)
tree2c7596ba911fcbb2d9c4f6a78cd17a5b143f2329
parente482d0744435a64693e3cb4e632a2abf09791d31 (diff)
downloadruby-247c77c99feb1e80df8f62216dd2d8b95e9de719.tar.gz
* string.c (rb_str_copy_to_vm): reset instance variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/mvm@25869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--string.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b9b4852e50..ddb9ac6055 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Nov 20 08:14:53 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_str_copy_to_vm): reset instance variables.
+
Fri Nov 20 04:39:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (rb_vm_send, rb_vm_recv): supported strings.
diff --git a/string.c b/string.c
index 52c40dd6d0..35d3c0d540 100644
--- a/string.c
+++ b/string.c
@@ -7550,6 +7550,8 @@ rb_str_copy_to_vm(VALUE str, struct rb_objspace *objspace)
{
VALUE copy = rb_newobj_from_heap(objspace);
*RSTRING(copy) = *RSTRING(str);
+ RBASIC(copy)->flags &= ~FL_FINALIZE|FL_EXIVAR;
+ RBASIC(copy)->flags |= FL_FREEZE;
if (!STR_EMBED_P(copy)) {
const long size = RSTRING(copy)->as.heap.len;
char *const ptr = rb_objspace_xmalloc(objspace, size);