From 4e788aa17e4d4c52e49f3386313bcb948431ea9a Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 2 Dec 2010 17:40:13 +0000 Subject: * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ re.c | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7268671b42..23fd4d03fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Dec 3 01:55:19 2010 NARUSE, Yui + + * 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 * encoding.c (enc_alias_internal): use xfree instead of free. diff --git a/re.c b/re.c index 41463eb199..090ae9c75f 100644 --- a/re.c +++ b/re.c @@ -2403,9 +2403,6 @@ rb_reg_initialize(VALUE obj, const char *s, long len, rb_encoding *enc, 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) { -- cgit v1.2.3