From f1a2033d759cda9806dd667a077235e6df80dabf Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 12 Mar 2017 18:01:22 +0000 Subject: merge revision(s) 57415,57463,57474: eval.c: copy special exception * eval.c (setup_exception): make unfrozen copy of special exception before setting up a cause. reduce iterations for slower machines test_io.rb: separate a test * test/ruby/test_io.rb (test_closed_stream_in_rescue): run in a separated process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index a86861c7fc..3bb9b83449 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -22,17 +22,17 @@ static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_thread_t *th, const rb_control_frame_t *cfp); VALUE -ruby_vm_sysstack_error_copy(void) +ruby_vm_special_exception_copy(VALUE exc) { - VALUE e = rb_obj_alloc(rb_eSysStackError); - rb_obj_copy_ivar(e, sysstack_error); + VALUE e = rb_obj_alloc(rb_class_real(RBASIC_CLASS(exc))); + rb_obj_copy_ivar(e, exc); return e; } static void vm_stackoverflow(void) { - rb_exc_raise(ruby_vm_sysstack_error_copy()); + rb_exc_raise(ruby_vm_special_exception_copy(sysstack_error)); } #if VM_CHECK_MODE > 0 -- cgit v1.2.3