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

ruby-changes:3776

From: ko1@a...
Date: Sun, 27 Jan 2008 16:27:05 +0900 (JST)
Subject: [ruby-changes:3776] naruse - Ruby:r15265 (trunk): * re.c (rb_reg_source): set encoding as regexp encoding.

naruse	2008-01-27 16:26:51 +0900 (Sun, 27 Jan 2008)

  New Revision: 15265

  Modified files:
    trunk/ChangeLog
    trunk/re.c

  Log:
    * re.c (rb_reg_source): set encoding as regexp encoding.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15265&r2=15264&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=15265&r2=15264&diff_format=u

Index: re.c
===================================================================
--- re.c	(revision 15264)
+++ re.c	(revision 15265)
@@ -311,7 +311,7 @@
     VALUE str;
 
     rb_reg_check(re);
-    str = rb_str_new(RREGEXP(re)->str,RREGEXP(re)->len);
+    str = rb_enc_str_new(RREGEXP(re)->str,RREGEXP(re)->len, rb_enc_get(re));
     if (OBJ_TAINTED(re)) OBJ_TAINT(str);
     return str;
 }
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15264)
+++ ChangeLog	(revision 15265)
@@ -1,3 +1,7 @@
+Sun Jan 27 16:25:27 2008  NARUSE, Yui  <naruse@r...>
+
+	* re.c (rb_reg_source): set encoding as regexp encoding.
+
 Sun Jan 27 05:56:39 2008  Tanaka Akira  <akr@f...>
 
 	* re.c (rb_reg_preprocess): force fixed encoding when ASCII

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

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