diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-30 14:12:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-30 14:12:16 +0000 |
commit | cb85fb9c4683f9d37dead6c7b1a6de027985d547 (patch) | |
tree | 2e581367a64f32e265f9f490cad5c08cf92b6acb | |
parent | 347da440cfefc7eec1d182110f4b42ac8e9af27b (diff) | |
download | ruby-cb85fb9c4683f9d37dead6c7b1a6de027985d547.tar.gz |
io.c: remove unnecessary shared
* io.c (rb_io_reopen): FilePathValue() ensures the path
NUL-terminated and frozen, so it is unnecessary to make it shared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -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 @@ -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; |