From d2f2f9db511afc348a88f864b9f0b0ccfc59a8f1 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Shuji Date: Sat, 14 Dec 2019 21:48:32 +0900 Subject: Remove location info from `Exception#inspect` Because location info (file name and line number) is kept in the backtrace, it should not be kept in the result of `inspect` (and the exception object itself), I think. ### Example ```ruby # example.rb begin raise "err" rescue => e p e end ``` #### Before this patch: ``` $ bin/mruby example.rb example.rb:2: err (RuntimeError) ``` #### After this patch: ``` $ bin/mruby example.rb err (RuntimeError) ``` --- include/mruby/class.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mruby/class.h b/include/mruby/class.h index 7c925f3b3..c15633e83 100644 --- a/include/mruby/class.h +++ b/include/mruby/class.h @@ -90,6 +90,7 @@ mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv); void mrb_class_name_class(mrb_state*, struct RClass*, struct RClass*, mrb_sym); mrb_bool mrb_const_name_p(mrb_state*, const char*, mrb_int); mrb_value mrb_class_find_path(mrb_state*, struct RClass*); +mrb_value mrb_mod_to_s(mrb_state*, mrb_value); void mrb_gc_mark_mt(mrb_state*, struct RClass*); size_t mrb_gc_mark_mt_size(mrb_state*, struct RClass*); void mrb_gc_free_mt(mrb_state*, struct RClass*); -- cgit v1.2.3