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.
This commit is contained in:
cremno
2015-07-16 03:56:31 +02:00
parent 207577f0af
commit 938ed044f4
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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;
}