зеркало из https://github.com/github/ruby.git
* re.c (rb_reg_prepare_re): stop ENCODING_NONE warning if the
encoding of the str is ASCII-8BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
1d41fe84f9
Коммит
b36c642a85
|
@ -3,6 +3,9 @@ Sat Dec 22 02:49:02 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
* parse.y (command): block from cmd_brace_block was ignored.
|
||||
[ruby-dev:32644]
|
||||
|
||||
* re.c (rb_reg_prepare_re): stop ENCODING_NONE warning if the
|
||||
encoding of the str is ASCII-8BIT.
|
||||
|
||||
Sat Dec 22 01:52:11 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* io.c (io_ungetc): avoid buffer relocation, which might cause
|
||||
|
|
3
re.c
3
re.c
|
@ -954,9 +954,10 @@ rb_reg_prepare_re(VALUE re, VALUE str)
|
|||
need_recompile = 1;
|
||||
}
|
||||
if ((RBASIC(re)->flags & REG_ENCODING_NONE) &&
|
||||
enc != rb_default_encoding() &&
|
||||
rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
|
||||
rb_warn("none encoding regexp with non ASCII string (string encoding: %s)",
|
||||
rb_enc_name(rb_enc_get(str)));
|
||||
rb_enc_name(enc));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче