From 7b218308e0e4470abbd13aad4b116c5df2e3d306 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 22 Feb 2008 15:02:40 +0000 Subject: [PATCH] * fix missing STR_ENC_GET. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string.c b/string.c index bc17754316..6faaa861fc 100644 --- a/string.c +++ b/string.c @@ -220,7 +220,7 @@ rb_enc_cr_str_copy(VALUE dest, VALUE src) ENC_CODERANGE_SET(dest, ENC_CODERANGE_7BIT); break; case ENC_CODERANGE_VALID: - if (!rb_enc_asciicompat(enc) || + if (!rb_enc_asciicompat(STR_ENC_GET(src)) || search_nonascii(RSTRING_PTR(dest), RSTRING_END(dest))) ENC_CODERANGE_SET(dest, ENC_CODERANGE_VALID); else