mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
5b7bdd56ad
commit
17fb1248af
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Feb 15 10:35:54 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* re.c (rb_reg_quote): set US-ACII for ASCII-only string.
|
||||
[ruby-dev:33785]
|
||||
|
||||
Fri Feb 15 10:27:47 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* {win,bcc}32/Makefile.sub (config.h): added HAVE_FTRUNCATE.
|
||||
|
|
2
re.c
2
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue