summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 636ec325ce..9bb8f33344 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -2294,7 +2294,7 @@ gzfile_s_open(int argc, VALUE *argv, VALUE klass, const char *mode)
}
filename = argv[0];
FilePathValue(filename);
- io = rb_file_open(RSTRING_PTR(filename), mode);
+ io = rb_file_open_str(filename, mode);
argv[0] = io;
return rb_gzfile_s_wrap(argc, argv, klass);