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

ruby-changes:18038

From: naruse <ko1@a...>
Date: Fri, 3 Dec 2010 04:19:51 +0900 (JST)
Subject: [ruby-changes:18038] Ruby:r30059 (trunk): Revert "* re.c (rb_reg_initialize): don't set US-ASCII to regexp"

naruse	2010-12-03 04:19:44 +0900 (Fri, 03 Dec 2010)

  New Revision: 30059

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

  Log:
    Revert "* re.c (rb_reg_initialize): don't set US-ASCII to regexp"
    
    This reverts commit r30058.

  Modified files:
    trunk/ChangeLog
    trunk/re.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30058)
+++ ChangeLog	(revision 30059)
@@ -1,9 +1,3 @@
-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 30058)
+++ re.c	(revision 30059)
@@ -2403,6 +2403,9 @@
 	    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/

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