summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/file.c b/file.c
index 2659ef7..eead657 100644
--- a/file.c
+++ b/file.c
@@ -176,6 +176,9 @@ rb_get_path_check(VALUE obj, int level)
rb_raise(rb_eEncCompatError, "path name must be ASCII-compatible (%s): %s",
rb_enc_name(enc), RSTRING_PTR(tmp));
}
+
+ StringValueCStr(tmp);
+
return rb_str_new4(tmp);
}