summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-24 11:31:21 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-24 11:31:21 +0000
commitfff358989970b6ac2d4e5971ee98ca1f8a32d639 (patch)
treeff152395587e00b413c7813ee58026a9d6925566 /compile.c
parent8f15f58210e55c08e8c1a2d38c7bf978cdedabc2 (diff)
* 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 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index ee4dc47e59..e62eb9cbbb 100644
--- a/compile.c
+++ b/compile.c
@@ -2999,10 +2999,10 @@ make_name_for_block(rb_iseq_t *iseq)
}
if (level == 1) {
- return rb_sprintf("block in %s", RSTRING_PTR(ip->location.label));
+ return rb_sprintf("block in %"PRIsVALUE, ip->location.label);
}
else {
- return rb_sprintf("block (%d levels) in %s", level, RSTRING_PTR(ip->location.label));
+ return rb_sprintf("block (%d levels) in %"PRIsVALUE, level, ip->location.label);
}
}