From 949ac512c47fe09094ca8246e3d25a7bf1f6225a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 6 Aug 2009 18:22:57 +0000 Subject: * eval.c (rb_exc_raise, rb_exc_fatal): nil is used to reraise. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 35669c839..d6d2b7afc 100644 --- a/eval.c +++ b/eval.c @@ -413,14 +413,18 @@ rb_longjmp(int tag, volatile VALUE mesg) void rb_exc_raise(VALUE mesg) { - mesg = rb_make_exception(1, &mesg); + if (!NIL_P(mesg)) { + mesg = rb_make_exception(1, &mesg); + } rb_longjmp(TAG_RAISE, mesg); } void rb_exc_fatal(VALUE mesg) { - mesg = rb_make_exception(1, &mesg); + if (!NIL_P(mesg)) { + mesg = rb_make_exception(1, &mesg); + } rb_longjmp(TAG_FATAL, mesg); } -- cgit