Use `mrb_str_concat` instead of `mrb_str_to_str` + `mrb_str_cat_str`
MODIFY
mrbgems/mruby-method/src/method.c
mrbgems/mruby-method/src/method.c
@@ -297,16 +297,16 @@ method_to_s(mrb_state *mrb, mrb_value self)
mrb_str_cat_lit(mrb, str, ": ");
rklass = mrb_class_ptr(klass);
if (mrb_class_ptr(owner) == rklass) {
- mrb_str_cat_str(mrb, str, mrb_str_to_str(mrb, owner));
+ mrb_str_concat(mrb, str, owner);
mrb_str_cat_lit(mrb, str, "#");
- mrb_str_cat_str(mrb, str, mrb_str_to_str(mrb, name));
+ mrb_str_concat(mrb, str, name);
}
else {
mrb_str_cat_cstr(mrb, str, mrb_class_name(mrb, rklass));
mrb_str_cat_lit(mrb, str, "(");
- mrb_str_cat_str(mrb, str, mrb_str_to_str(mrb, owner));
+ mrb_str_concat(mrb, str, owner);
mrb_str_cat_lit(mrb, str, ")#");
- mrb_str_cat_str(mrb, str, mrb_str_to_str(mrb, name));
+ mrb_str_concat(mrb, str, name);
}
mrb_str_cat_lit(mrb, str, ">");
return str;

Use `mrb_str_concat` instead of `mrb_str_to_str` + `mrb_str_cat_str`