summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-25 03:28:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-25 03:28:00 +0000
commit43b9684962629fb035275d9d362207f5361e809b (patch)
tree5fc8c4edd7977b039cf89c8bfa05f33d13f9b01e /string.c
parentac9d09ba3c73417a6a53e9683d433419ca15504a (diff)
* string.c (rb_str_force_encoding): should clear coderange at changing
encoding. [ruby-core:22437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index a2f9e4af4b..f9730012c5 100644
--- a/string.c
+++ b/string.c
@@ -6889,6 +6889,7 @@ rb_str_force_encoding(VALUE str, VALUE enc)
{
str_modifiable(str);
rb_enc_associate(str, rb_to_encoding(enc));
+ ENC_CODERANGE_CLEAR(str);
return str;
}