From c2f7ed2f243840ff5e3b0e04e06efcf8a3a0cb6a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Mar 2010 08:32:03 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ transcode.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aa6e87d804..38e5e2d34f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Mar 11 17:31:59 2010 Nobuyoshi Nakada + + * transcode.c (str_transcode0): confirm the code range. + Thu Mar 11 12:14:17 2010 Nobuyoshi Nakada * missing/signbit.c: added. diff --git a/transcode.c b/transcode.c index 9d6a886850..dba26a2394 100644 --- a/transcode.c +++ b/transcode.c @@ -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; } }