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

ruby-changes:2123

From: ko1@a...
Date: 4 Oct 2007 16:16:19 +0900
Subject: [ruby-changes:2123] nobu - Ruby:r13614 (trunk): * parse.y (reg_compile_gen): copy encoding from source string.

nobu	2007-10-04 16:16:04 +0900 (Thu, 04 Oct 2007)

  New Revision: 13614

  Modified files:
    trunk/ChangeLog
    trunk/parse.y

  Log:
    * parse.y (reg_compile_gen): copy encoding from source string.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=13614&r2=13613
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13614&r2=13613

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13613)
+++ ChangeLog	(revision 13614)
@@ -1,7 +1,9 @@
-Thu Oct  4 15:57:16 2007  Nobuyoshi Nakada  <nobu@r...>
+Thu Oct  4 16:15:55 2007  Nobuyoshi Nakada  <nobu@r...>
 
 	* encoding.c (rb_obj_encoding): returns encoding of the given object.
 
+	* parse.y (reg_compile_gen): copy encoding from source string.
+
 	* re.c (Init_Regexp): new method Regexp#encoding.
 
 	* string.c (str_encoding): moved to encoding.c
Index: parse.y
===================================================================
--- parse.y	(revision 13613)
+++ parse.y	(revision 13614)
@@ -8170,6 +8170,7 @@
 	compile_error(PARSER_ARG "%s", RSTRING_PTR(re));
 	return Qnil;
     }
+    rb_enc_copy(re, str);
     return re;
 }
 

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

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