summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-proc-ext/src/proc.c
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-06-11 18:55:39 +0900
committerKOBAYASHI Shuji <[email protected]>2019-06-11 20:33:07 +0900
commit3b9b326d3ccd21e45f498272c8bb8d3f338ccd60 (patch)
tree8ba21ff4a6dc4db791c9995ebcac8ae58acfaa66 /mrbgems/mruby-proc-ext/src/proc.c
parent313059d08ca95f9fee4e2b00f218cb21ea83418c (diff)
downloadmruby-3b9b326d3ccd21e45f498272c8bb8d3f338ccd60.tar.gz
mruby-3b9b326d3ccd21e45f498272c8bb8d3f338ccd60.zip
Remove redundant colon in `Proc#inspect` (`mruby-proc-ext`)
Before this patch: $ bin/mruby -e 'p proc{}' #=> #<Proc:0x7fd5eb8206d0@-e::1> After this patch: $ bin/mruby -e 'p proc{}' #=> #<Proc:0x7fd5eb8206d0@-e:1>
Diffstat (limited to 'mrbgems/mruby-proc-ext/src/proc.c')
-rw-r--r--mrbgems/mruby-proc-ext/src/proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c
index 17884e3c6..c9041ec75 100644
--- a/mrbgems/mruby-proc-ext/src/proc.c
+++ b/mrbgems/mruby-proc-ext/src/proc.c
@@ -38,7 +38,7 @@ mrb_proc_inspect(mrb_state *mrb, mrb_value self)
{
struct RProc *p = mrb_proc_ptr(self);
mrb_value str = mrb_str_new_lit(mrb, "#<Proc:");
- mrb_str_concat(mrb, str, mrb_ptr_to_str(mrb, mrb_cptr(self)));
+ mrb_str_cat_str(mrb, str, mrb_ptr_to_str(mrb, mrb_cptr(self)));
if (!MRB_PROC_CFUNC_P(p)) {
mrb_irep *irep = p->body.irep;
@@ -52,7 +52,7 @@ mrb_proc_inspect(mrb_state *mrb, mrb_value self)
line = mrb_debug_get_line(mrb, irep, 0);
if (line != -1) {
- str = mrb_format(mrb, "%S:%S", str, mrb_fixnum_value(line));
+ mrb_str_concat(mrb, str, mrb_fixnum_value(line));
}
else {
mrb_str_cat_lit(mrb, str, "-");