Use mrb_str_cat() instead of mrb_str_cat2() as possible.

This commit is contained in:
Masaki Muranaka
2013-03-23 15:55:55 +09:00
parent acab35a2a5
commit 92821cf2ef
4 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -129,25 +129,25 @@ exc_inspect(mrb_state *mrb, mrb_value exc)
if (!mrb_nil_p(file) && !mrb_nil_p(line)) {
str = file;
mrb_str_cat2(mrb, str, ":");
mrb_str_cat(mrb, str, ":", 1);
mrb_str_append(mrb, str, line);
mrb_str_cat2(mrb, str, ": ");
mrb_str_cat(mrb, str, ": ", 2);
if (!mrb_nil_p(mesg) && RSTRING_LEN(mesg) > 0) {
mrb_str_append(mrb, str, mesg);
mrb_str_cat2(mrb, str, " (");
mrb_str_cat(mrb, str, " (", 2);
}
mrb_str_cat2(mrb, str, mrb_obj_classname(mrb, exc));
if (!mrb_nil_p(mesg) && RSTRING_LEN(mesg) > 0) {
mrb_str_cat2(mrb, str, ")");
mrb_str_cat(mrb, str, ")", 1);
}
}
else {
str = mrb_str_new_cstr(mrb, mrb_obj_classname(mrb, exc));
if (!mrb_nil_p(mesg) && RSTRING_LEN(mesg) > 0) {
mrb_str_cat2(mrb, str, ": ");
mrb_str_cat(mrb, str, ": ", 2);
mrb_str_append(mrb, str, mesg);
} else {
mrb_str_cat2(mrb, str, ": ");
mrb_str_cat(mrb, str, ": ", 2);
mrb_str_cat2(mrb, str, mrb_obj_classname(mrb, exc));
}
}