summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 6aeb029f2f..4111e963c7 100644
--- a/string.c
+++ b/string.c
@@ -7624,7 +7624,7 @@ rb_str_b(VALUE str)
VALUE str2 = str_alloc(rb_cString);
str_replace_shared_without_enc(str2, str);
OBJ_INFECT(str2, str);
- ENC_CODERANGE_SET(str2, ENC_CODERANGE_VALID);
+ ENC_CODERANGE_CLEAR(str2);
return str2;
}