From 17fb1248afd41c0da5c421c34d029695bb690069 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 15 Feb 2008 01:35:56 +0000 Subject: [PATCH] * re.c (rb_reg_quote): set US-ACII for ASCII-only string. [ruby-dev:33785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ re.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0af61047a0..02e1c31d6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Feb 15 10:35:54 2008 Nobuyoshi Nakada + + * re.c (rb_reg_quote): set US-ACII for ASCII-only string. + [ruby-dev:33785] + Fri Feb 15 10:27:47 2008 Nobuyoshi Nakada * {win,bcc}32/Makefile.sub (config.h): added HAVE_FTRUNCATE. diff --git a/re.c b/re.c index cd93024302..4867104250 100644 --- a/re.c +++ b/re.c @@ -2540,7 +2540,7 @@ rb_reg_quote(VALUE str) } if (ascii_only && rb_enc_get_index(str) != 0) { str = rb_str_new3(str); - rb_enc_associate(str, rb_ascii8bit_encoding()); + rb_enc_associate(str, rb_usascii_encoding()); } return str;