summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/string.c b/string.c
index e6670d31b..341bfd746 100644
--- a/string.c
+++ b/string.c
@@ -667,9 +667,6 @@ str_strlen(VALUE str, rb_encoding *enc)
if (len < 0) {
rb_raise(rb_eArgError, "invalid mbstring sequence");
}
- if (ENC_CODERANGE(str) != ENC_CODERANGE_VALID && enc == STR_ENC_GET(str)) {
- ENC_CODERANGE_SET(str, ENC_CODERANGE_VALID);
- }
return len;
}