summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-24 14:52:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-24 14:52:07 +0000
commit54fa9f9e1378aa7ef925f86ae776f3d6843eeab3 (patch)
tree54db8eb40f8c2ec84196eaab46c3ca9fc7bf90cb /vm_insnhelper.c
parent7bf450d0c30e2617fae9c54e977615f68dfac86e (diff)
eval.c: copy special exception
* eval.c (setup_exception): make unfrozen copy of special exception before setting up a cause. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 662a2d6456..a1c3a9809d 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