diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-19 23:15:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-19 23:15:03 +0000 |
commit | 247c77c99feb1e80df8f62216dd2d8b95e9de719 (patch) | |
tree | 2c7596ba911fcbb2d9c4f6a78cd17a5b143f2329 | |
parent | e482d0744435a64693e3cb4e632a2abf09791d31 (diff) | |
download | ruby-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-- | ChangeLog | 4 | ||||
-rw-r--r-- | string.c | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -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. @@ -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); |