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

ruby-changes:41664

From: nobu <ko1@a...>
Date: Thu, 4 Feb 2016 15:46:28 +0900 (JST)
Subject: [ruby-changes:41664] nobu:r53738 (trunk): revert re.c in r53736

nobu	2016-02-04 15:46:28 +0900 (Thu, 04 Feb 2016)

  New Revision: 53738

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53738

  Log:
    revert re.c in r53736
    
    * re.c (rb_reg_initialize): must copy the source string content,
      it is not a static literal.

  Modified files:
    trunk/ChangeLog
    trunk/re.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53737)
+++ ChangeLog	(revision 53738)
@@ -3,8 +3,6 @@ Thu Feb  4 15:35:29 2016  Nobuyoshi Naka https://github.com/ruby/ruby/blob/trunk/ChangeLog#L3
 	* string.c (rb_fstring_enc_new, rb_fstring_enc_cstr): functions to
 	  make fstring with encoding.
 
-	* re.c (rb_reg_initialize): make fstring without copying.
-
 Thu Feb  4 14:42:29 2016  Martin Duerst  <duerst@i...>
 
 	* common.mk: Added Unicode data file SpecialCasing.txt to be additionally
Index: re.c
===================================================================
--- re.c	(revision 53737)
+++ re.c	(revision 53738)
@@ -2580,7 +2580,7 @@ rb_reg_initialize(VALUE obj, const char https://github.com/ruby/ruby/blob/trunk/re.c#L2580
 			  options & ARG_REG_OPTION_MASK, err,
 			  sourcefile, sourceline);
     if (!re->ptr) return -1;
-    RB_OBJ_WRITE(obj, &re->src, rb_fstring_enc_new(s, len, enc));
+    RB_OBJ_WRITE(obj, &re->src, rb_fstring(rb_enc_str_new(s, len, enc)));
     RB_GC_GUARD(unescaped);
     return 0;
 }

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

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