diff options
-rw-r--r-- | error.c | 4 | ||||
-rw-r--r-- | eval.c | 4 | ||||
-rw-r--r-- | eval_error.c | 11 | ||||
-rw-r--r-- | test/ruby/test_exception.rb | 12 |
4 files changed, 31 insertions, 0 deletions
@@ -2959,6 +2959,8 @@ ivar_copy_i(st_data_t key, st_data_t val, st_data_t exc) return ST_CONTINUE; } static VALUE exception_loader(VALUE exc, VALUE obj) { @@ -2973,6 +2975,8 @@ exception_loader(VALUE exc, VALUE obj) rb_ivar_foreach(obj, ivar_copy_i, exc); if (rb_attr_get(exc, id_bt) == rb_attr_get(exc, id_bt_locations)) { rb_ivar_set(exc, id_bt_locations, Qnil); } @@ -537,12 +537,16 @@ exc_setup_message(const rb_execution_context_t *ec, VALUE mesg, VALUE *cause) } if (!nocircular && !NIL_P(*cause) && !UNDEF_P(*cause) && *cause != mesg) { VALUE c = *cause; while (!NIL_P(c = rb_attr_get(c, id_cause))) { if (c == mesg) { rb_raise(rb_eArgError, "circular causes"); } } } return mesg; } @@ -291,6 +291,17 @@ show_cause(VALUE errinfo, VALUE str, VALUE opt, VALUE highlight, VALUE reverse, } void rb_error_write(VALUE errinfo, VALUE emesg, VALUE errat, VALUE str, VALUE opt, VALUE highlight, VALUE reverse) { volatile VALUE eclass; @@ -1412,6 +1412,18 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| end; end def test_super_in_method_missing assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") begin; |