summaryrefslogtreecommitdiffhomepage
path: root/src/error.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-02-28 00:50:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-02-28 00:50:26 +0900
commit5bd90b59a9709c843438a04cfeded97dbd6e040a (patch)
tree6c077504627a036aa01f959db5fdadc2032fc083 /src/error.c
parentd1526b0409a31667de95fbc3b0da23a62ca8bfea (diff)
parentbd0244d067a9523c98a071c49214a03494c8b20b (diff)
downloadmruby-5bd90b59a9709c843438a04cfeded97dbd6e040a.tar.gz
mruby-5bd90b59a9709c843438a04cfeded97dbd6e040a.zip
Merge pull request #1757 from cubicdaiya/issues/use_mrb_str_cat_lit
use mrb_str_cat_lit() intead of mrb_str_cat
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/error.c b/src/error.c
index 26dc97166..db516d766 100644
--- a/src/error.c
+++ b/src/error.c
@@ -128,26 +128,26 @@ exc_inspect(mrb_state *mrb, mrb_value exc)
if (!mrb_nil_p(file) && !mrb_nil_p(line)) {
str = file;
- mrb_str_cat(mrb, str, ":", 1);
+ mrb_str_cat_lit(mrb, str, ":");
mrb_str_append(mrb, str, line);
- mrb_str_cat(mrb, str, ": ", 2);
+ mrb_str_cat_lit(mrb, str, ": ");
if (!mrb_nil_p(mesg) && RSTRING_LEN(mesg) > 0) {
mrb_str_append(mrb, str, mesg);
- mrb_str_cat(mrb, str, " (", 2);
+ mrb_str_cat_lit(mrb, str, " (");
}
mrb_str_cat_cstr(mrb, str, mrb_obj_classname(mrb, exc));
if (!mrb_nil_p(mesg) && RSTRING_LEN(mesg) > 0) {
- mrb_str_cat(mrb, str, ")", 1);
+ mrb_str_cat_lit(mrb, str, ")");
}
}
else {
str = mrb_str_new_cstr(mrb, mrb_obj_classname(mrb, exc));
if (!mrb_nil_p(mesg) && RSTRING_LEN(mesg) > 0) {
- mrb_str_cat(mrb, str, ": ", 2);
+ mrb_str_cat_lit(mrb, str, ": ");
mrb_str_append(mrb, str, mesg);
}
else {
- mrb_str_cat(mrb, str, ": ", 2);
+ mrb_str_cat_lit(mrb, str, ": ");
mrb_str_cat_cstr(mrb, str, mrb_obj_classname(mrb, exc));
}
}