From 938ed044f4e053c1832be3868230d80ccba190e8 Mon Sep 17 00:00:00 2001 From: cremno Date: Thu, 16 Jul 2015 03:56:31 +0200 Subject: use mrb_str_cat_str() instead of mrb_str_append() If the argument is always a string, then mrb_str_cat_str() can be directly called instead of indirectly by mrb_str_append(). mrb_any_to_s(), mrb_obj_as_string(), mrb_inspect() always return a string. --- src/variable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/variable.c') diff --git a/src/variable.c b/src/variable.c index 1b2ad56a7..efe6fad12 100644 --- a/src/variable.c +++ b/src/variable.c @@ -609,7 +609,7 @@ inspect_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p) else { ins = mrb_inspect(mrb, v); } - mrb_str_append(mrb, str, ins); + mrb_str_cat_str(mrb, str, ins); return 0; } -- cgit v1.2.3