aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index 12d4e01c59..8a0a7de2a2 100644
--- a/io.c
+++ b/io.c
@@ -3799,7 +3799,8 @@ rb_f_open(int argc, VALUE *argv)
redirect = Qtrue;
}
else {
- VALUE tmp = rb_check_string_type(argv[0]);
+ VALUE tmp = argv[0];
+ FilePathValue(tmp);
if (NIL_P(tmp)) {
redirect = Qtrue;
}