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

ruby-changes:18037

From: naruse <ko1@a...>
Date: Fri, 3 Dec 2010 02:40:23 +0900 (JST)
Subject: [ruby-changes:18037] Ruby:r30058 (trunk): * re.c (rb_reg_initialize): don't set US-ASCII to regexp

naruse	2010-12-03 02:40:13 +0900 (Fri, 03 Dec 2010)

  New Revision: 30058

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

  Log:
    * re.c (rb_reg_initialize): don't set US-ASCII to regexp
      when parser make initially compile a regexp.
      Usually regexp are used for the same of its script encoding.

  Modified files:
    trunk/ChangeLog
    trunk/re.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30057)
+++ ChangeLog	(revision 30058)
@@ -1,3 +1,9 @@
+Fri Dec  3 01:55:19 2010  NARUSE, Yui  <naruse@r...>
+
+	* re.c (rb_reg_initialize): don't set US-ASCII to regexp
+	  when parser make initially compile a regexp.
+	  Usually regexp are used for the same of its script encoding.
+
 Fri Dec  3 01:52:43 2010  NARUSE, Yui  <naruse@r...>
 
 	* encoding.c (enc_alias_internal): use xfree instead of free.
Index: re.c
===================================================================
--- re.c	(revision 30057)
+++ re.c	(revision 30058)
@@ -2403,9 +2403,6 @@
 	    enc = fixed_enc;
 	}
     }
-    else if (!(options & ARG_ENCODING_FIXED)) {
-       enc = rb_usascii_encoding();
-    }
 
     rb_enc_associate((VALUE)re, enc);
     if ((options & ARG_ENCODING_FIXED) || fixed_enc) {

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

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