aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/string.c b/string.c
index 4cb62375da..d1a051b6dd 100644
--- a/string.c
+++ b/string.c
@@ -1247,9 +1247,7 @@ rb_obj_as_string(VALUE obj)
str = rb_funcall(obj, idTo_s, 0);
if (!RB_TYPE_P(str, T_STRING))
return rb_any_to_s(obj);
- if (!FL_SET(str, RSTRING_FSTR) && FL_ABLE(obj))
- /* fstring must not be tainted, at least */
- OBJ_INFECT_RAW(str, obj);
+ OBJ_INFECT(str, obj);
return str;
}