[前][次][番号順一覧][スレッド一覧]

ruby-changes:14058

From: nobu <ko1@a...>
Date: Fri, 20 Nov 2009 08:23:29 +0900 (JST)
Subject: [ruby-changes:14058] Ruby:r25869 (mvm): * string.c (rb_str_copy_to_vm): reset instance variables.

nobu	2009-11-20 08:15:03 +0900 (Fri, 20 Nov 2009)

  New Revision: 25869

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25869

  Log:
    * string.c (rb_str_copy_to_vm): reset instance variables.

  Modified files:
    branches/mvm/ChangeLog
    branches/mvm/string.c

Index: mvm/ChangeLog
===================================================================
--- mvm/ChangeLog	(revision 25868)
+++ mvm/ChangeLog	(revision 25869)
@@ -1,3 +1,7 @@
+Fri Nov 20 08:14:53 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* string.c (rb_str_copy_to_vm): reset instance variables.
+
 Fri Nov 20 04:39:40 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* vm.c (rb_vm_send, rb_vm_recv): supported strings.
Index: mvm/string.c
===================================================================
--- mvm/string.c	(revision 25868)
+++ mvm/string.c	(revision 25869)
@@ -7550,6 +7550,8 @@
 {
     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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]