Unverified Commit e348326f authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4760 from...

Merge pull request #4760 from shuujii/use-mrb_str_concat-instead-of-mrb_str_to_str-plus-mrb_str_cat_str

Use `mrb_str_concat` instead of `mrb_str_to_str` + `mrb_str_cat_str`
parents b7a8d538 97c62408
...@@ -297,16 +297,16 @@ method_to_s(mrb_state *mrb, mrb_value self) ...@@ -297,16 +297,16 @@ method_to_s(mrb_state *mrb, mrb_value self)
mrb_str_cat_lit(mrb, str, ": "); mrb_str_cat_lit(mrb, str, ": ");
rklass = mrb_class_ptr(klass); rklass = mrb_class_ptr(klass);
if (mrb_class_ptr(owner) == rklass) { 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_lit(mrb, str, "#");
mrb_str_cat_str(mrb, str, mrb_str_to_str(mrb, name)); mrb_str_concat(mrb, str, name);
} }
else { else {
mrb_str_cat_cstr(mrb, str, mrb_class_name(mrb, rklass)); mrb_str_cat_cstr(mrb, str, mrb_class_name(mrb, rklass));
mrb_str_cat_lit(mrb, str, "("); 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_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, ">"); mrb_str_cat_lit(mrb, str, ">");
return str; return str;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment