Skip to content
Permalink
Browse files
Avoid call to_s during backtrace traversal
  • Loading branch information
craiglrock committed May 16, 2017
1 parent 82bc036 commit 3de2da409b032210ac64cca05fb4a7bf90f07881
Showing 1 changed file with 1 addition and 1 deletion.
@@ -79,7 +79,7 @@ get_backtrace_i(mrb_state *mrb, struct backtrace_location *loc, void *data)
ary = mrb_obj_value((struct RArray*)data);

str = mrb_str_new_cstr(mrb, loc->filename);
str = mrb_format(mrb, "%S:%S", str, mrb_fixnum_value(loc->lineno));
str = mrb_format(mrb, "%S:%S", str, mrb_fixnum_to_str(mrb, mrb_fixnum_value(loc->lineno), 10));

if (loc->method) {
mrb_str_cat_lit(mrb, str, ":in ");

0 comments on commit 3de2da4

Please sign in to comment.