Skip to content

Commit

Permalink
mrb_str_len_to_inum(): inspect string in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Dec 1, 2015
1 parent 36fabe1 commit ca417da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,8 @@ mrb_str_len_to_inum(mrb_state *mrb, const char *str, size_t len, int base, int b
mrb_raise(mrb, E_ARGUMENT_ERROR, "string contains null byte");
/* not reached */
bad:
mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid string for number(%S)", mrb_str_new_cstr(mrb, str));
mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid string for number(%S)",
mrb_inspect(mrb, mrb_str_new_cstr(mrb, str)));
/* not reached */
return mrb_fixnum_value(0);
}
Expand Down

0 comments on commit ca417da

Please sign in to comment.