summaryrefslogtreecommitdiffhomepage
path: root/src/error.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-03-23 03:46:52 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2013-03-23 03:46:52 -0700
commitaf2f3dd16f0d322a4d878196c1b8565cc264d625 (patch)
tree7138d6d52cf84e65fe32c98d1b092dd9431305d9 /src/error.c
parentfe7472852255f3b265eaa32cd59e869b9528ece6 (diff)
parent0cedf8fa02848bc505d7cda29f7266b5e03a9076 (diff)
downloadmruby-af2f3dd16f0d322a4d878196c1b8565cc264d625.tar.gz
mruby-af2f3dd16f0d322a4d878196c1b8565cc264d625.zip
Merge pull request #1050 from monaka/pr-cleanup-string.c-20130323
Clean up string.c
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/error.c b/src/error.c
index 7cb6b53ef..f46887465 100644
--- a/src/error.c
+++ b/src/error.c
@@ -129,26 +129,26 @@ 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));
+ mrb_str_cat_cstr(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_cat2(mrb, str, mrb_obj_classname(mrb, exc));
+ mrb_str_cat(mrb, str, ": ", 2);
+ mrb_str_cat_cstr(mrb, str, mrb_obj_classname(mrb, exc));
}
}
return str;