зеркало из https://github.com/github/ruby.git
Revert "* re.c (rb_reg_initialize): don't set US-ASCII to regexp"
This reverts commit r30058. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
4e788aa17e
Коммит
3010758245
|
@ -1,9 +1,3 @@
|
|||
Fri Dec 3 01:55:19 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* encoding.c (enc_alias_internal): use xfree instead of free.
|
||||
|
|
3
re.c
3
re.c
|
@ -2403,6 +2403,9 @@ 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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче