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;