From 2fed885b253b553592b05ab40a3f009dfcea0a41 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 22 Jul 2008 08:53:34 +0000 Subject: * compile.c (insn_data_to_s_detail), file.c (rb_stat_inspect), iseq.c (ruby_iseq_disasm_insn, ruby_iseq_disasm), process.c (pst_message), re.c (match_inspect): use rb_str_catf. * dir.c (dir_inspect), iseq.c (iseq_inspect, insn_operand_intern): use rb_sprintf. * error.c (rb_name_error, rb_raise, rb_loaderror, rb_fatal): use rb_vsprintf. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index c061ef9e2..504c1d243 100644 --- a/re.c +++ b/re.c @@ -1806,9 +1806,7 @@ match_inspect(VALUE match) if (names[i].name) rb_str_buf_cat(str, (const char *)names[i].name, names[i].len); else { - char buf[sizeof(i)*3+1]; - snprintf(buf, sizeof(buf), "%d", i); - rb_str_buf_cat2(str, buf); + rb_str_catf(str, "%d", i); } rb_str_buf_cat2(str, ":"); } -- cgit