summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 7e64d081a9..d0f66dcd6d 100644
--- a/ruby.c
+++ b/ruby.c
@@ -2186,7 +2186,9 @@ external_str_new_cstr(const char *p)
{
#if UTF8_PATH
VALUE str = rb_utf8_str_new_cstr(p);
- return str_conv_enc(str, NULL, rb_default_external_encoding());
+ str = str_conv_enc(str, NULL, rb_default_external_encoding());
+ OBJ_TAINT_RAW(str);
+ return str;
#else
return rb_external_str_new_cstr(p);
#endif