mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* transcode.c (str_transcode0): confirm the code range.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5b8af7521f
commit
c2f7ed2f24
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Mar 11 17:31:59 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* transcode.c (str_transcode0): confirm the code range.
|
||||
|
||||
Thu Mar 11 12:14:17 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* missing/signbit.c: added.
|
||||
|
|
|
@ -2590,7 +2590,7 @@ str_transcode0(int argc, VALUE *argv, VALUE *self, int ecflags, VALUE ecopts)
|
|||
return NIL_P(arg2) ? -1 : dencidx;
|
||||
}
|
||||
if (senc && denc && rb_enc_asciicompat(senc) && rb_enc_asciicompat(denc)) {
|
||||
if (ENC_CODERANGE(str) == ENC_CODERANGE_7BIT) {
|
||||
if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) {
|
||||
return dencidx;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue