summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-22 15:02:40 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-22 15:02:40 +0000
commitc8369302281c92e08f9c7260e6b75d14e7d0e523 (patch)
treefb31bc32760c6a84120f8ea38e002ffe2c4cddab
parent242dcd23e1ed8fa10ec29812e58fdeab605013c2 (diff)
downloadruby-c8369302281c92e08f9c7260e6b75d14e7d0e523.tar.gz
ruby-c8369302281c92e08f9c7260e6b75d14e7d0e523.tar.xz
ruby-c8369302281c92e08f9c7260e6b75d14e7d0e523.zip
* fix missing STR_ENC_GET.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index bc1775431..6faaa861f 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