From fff358989970b6ac2d4e5971ee98ca1f8a32d639 Mon Sep 17 00:00:00 2001 From: charliesome Date: Mon, 24 Jun 2013 11:31:21 +0000 Subject: * 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 --- encoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'encoding.c') diff --git a/encoding.c b/encoding.c index ad7e4bcc14..1e875018e4 100644 --- a/encoding.c +++ b/encoding.c @@ -179,7 +179,7 @@ str_to_encindex(VALUE enc) { int idx = str_find_encindex(enc); if (idx < 0) { - rb_raise(rb_eArgError, "unknown encoding name - %s", RSTRING_PTR(enc)); + rb_raise(rb_eArgError, "unknown encoding name - %"PRIsVALUE, enc); } return idx; } -- cgit v1.2.3