summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-proc-ext
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-proc-ext')
-rw-r--r--mrbgems/mruby-proc-ext/src/proc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c
index f7f031e7b..b13606f5f 100644
--- a/mrbgems/mruby-proc-ext/src/proc.c
+++ b/mrbgems/mruby-proc-ext/src/proc.c
@@ -52,10 +52,7 @@ mrb_proc_inspect(mrb_state *mrb, mrb_value self)
line = mrb_debug_get_line(irep, 0);
if (line != -1) {
- char buf[32];
-
- snprintf(buf, sizeof(buf), "%" PRId32, line);
- mrb_str_cat_cstr(mrb, str, buf);
+ str = mrb_format(mrb, "%S:%S", str, mrb_fixnum_value(line));
}
else {
mrb_str_cat_lit(mrb, str, "-");