aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--io.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b5a1eeb2d5..ad63a4a6bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 30 23:12:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_io_reopen): FilePathValue() ensures the path
+ NUL-terminated and frozen, so it is unnecessary to make it shared.
+
Tue Jun 30 23:11:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dir.c (check_dirname): ensure path name NUL-terminated for
diff --git a/io.c b/io.c
index 184f0e6496..285d829ced 100644
--- a/io.c
+++ b/io.c
@@ -6778,7 +6778,7 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file)
oflags = rb_io_fmode_oflags(fptr->mode);
}
- fptr->pathv = rb_str_new_frozen(fname);
+ fptr->pathv = fname;
if (fptr->fd < 0) {
fptr->fd = rb_sysopen(fptr->pathv, oflags, 0666);
fptr->stdio_file = 0;