Skip to content

Commit

Permalink
* transcode.c (str_transcode0): confirm the code range.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Mar 11, 2010
1 parent 5b8af75 commit c2f7ed2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Thu Mar 11 17:31:59 2010 Nobuyoshi Nakada <[email protected]>

* transcode.c (str_transcode0): confirm the code range.

Thu Mar 11 12:14:17 2010 Nobuyoshi Nakada <[email protected]>

* missing/signbit.c: added.
Expand Down
2 changes: 1 addition & 1 deletion transcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit c2f7ed2

Please sign in to comment.