diff options
author | charliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-24 11:31:21 +0000 |
---|---|---|
committer | charliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-24 11:31:21 +0000 |
commit | fff358989970b6ac2d4e5971ee98ca1f8a32d639 (patch) | |
tree | ff152395587e00b413c7813ee58026a9d6925566 /io.c | |
parent | 8f15f58210e55c08e8c1a2d38c7bf978cdedabc2 (diff) | |
download | ruby-fff358989970b6ac2d4e5971ee98ca1f8a32d639.tar.gz |
* compile.c (make_name_for_block): use PRIsVALUE in format string
instead of %s and RSTRING_PTR to protect objects from being garbage
collected too soon
* encoding.c (str_to_encindex): ditto
* hash.c (rb_hash_fetch_m): ditto
* io.c (rb_io_reopen): ditto
* parse.y (reg_fragment_check_gen): ditto
* parse.y (reg_compile_gen): ditto
* parse.y (ripper_assert_Qundef): ditto
* re.c (rb_reg_raise): ditto
* ruby.c (set_option_encoding_once): ditto
* vm_eval.c (rb_throw_obj): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6554,15 +6554,15 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file) rb_fd_fix_cloexec(fptr->fd); #ifdef USE_SETVBUF if (setvbuf(fptr->stdio_file, NULL, _IOFBF, 0) != 0) - rb_warn("setvbuf() can't be honoured for %s", RSTRING_PTR(fptr->pathv)); + rb_warn("setvbuf() can't be honoured for %"PRIsVALUE, fptr->pathv); #endif if (fptr->stdio_file == stderr) { if (setvbuf(fptr->stdio_file, NULL, _IONBF, BUFSIZ) != 0) - rb_warn("setvbuf() can't be honoured for %s", RSTRING_PTR(fptr->pathv)); + rb_warn("setvbuf() can't be honoured for %"PRIsVALUE, fptr->pathv); } else if (fptr->stdio_file == stdout && isatty(fptr->fd)) { if (setvbuf(fptr->stdio_file, NULL, _IOLBF, BUFSIZ) != 0) - rb_warn("setvbuf() can't be honoured for %s", RSTRING_PTR(fptr->pathv)); + rb_warn("setvbuf() can't be honoured for %"PRIsVALUE, fptr->pathv); } } else { |