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 --- file.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index f7a1af9f5..419979bcf 100644 --- a/file.c +++ b/file.c @@ -687,16 +687,10 @@ rb_stat_inspect(VALUE self) rb_str_buf_cat2(str, "="); v = (*member[i].func)(self); if (i == 2) { /* mode */ - char buf[32]; - - sprintf(buf, "0%lo", NUM2ULONG(v)); - rb_str_buf_cat2(str, buf); + rb_str_catf(str, "0%lo", NUM2ULONG(v)); } else if (i == 0 || i == 6) { /* dev/rdev */ - char buf[32]; - - sprintf(buf, "0x%lx", NUM2ULONG(v)); - rb_str_buf_cat2(str, buf); + rb_str_catf(str, "0x%lx", NUM2ULONG(v)); } else { rb_str_append(str, rb_inspect(v)); -- cgit