summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-11-03 01:40:51 +0900
committerYukihiro Matsumoto <[email protected]>2012-11-03 01:40:51 +0900
commite0aa96a6826c5627e7cead998d3fe5f865930c35 (patch)
tree99ca88be7f535c8f3bde1adc8e11518b8b57ba03 /tools
parentb06d8e2ab8773324f067c76c6cacfde672bd66b7 (diff)
downloadmruby-e0aa96a6826c5627e7cead998d3fe5f865930c35.tar.gz
mruby-e0aa96a6826c5627e7cead998d3fe5f865930c35.zip
avoid trigraph (???) in backtrace
Diffstat (limited to 'tools')
-rw-r--r--tools/mruby/mruby.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/mruby/mruby.c b/tools/mruby/mruby.c
index acecc7c8e..61c2b1445 100644
--- a/tools/mruby/mruby.c
+++ b/tools/mruby/mruby.c
@@ -200,14 +200,12 @@ showcallinfo(mrb_state *mrb)
sep = "#";
method = mrb_sym2name(mrb, ci->mid);
- if (method == NULL)
- method = "(???)";
-
- printf("\t[%d] %s:%d:in %s%s%s\n",
+ printf("\t[%d] %s:%d%s%s%s%s\n",
i, filename, line,
- mrb_class_name(mrb, ci->proc->target_class),
- sep,
- method);
+ method ? ":in " : "",
+ method ? mrb_class_name(mrb, ci->proc->target_class) : "",
+ method ? sep : "",
+ method ? method : "");
}
}