diff --git a/ChangeLog b/ChangeLog index 5c0fcbec06..2e01c5f84d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Aug 7 03:22:50 2009 Nobuyoshi Nakada + + * eval.c (rb_exc_raise, rb_exc_fatal): nil is used to reraise. + Fri Aug 7 01:49:41 2009 Akinori MUSHA * ext/digest/sha2/sha2.c: The ULL suffix is not supported by diff --git a/eval.c b/eval.c index 35669c8395..d6d2b7afc7 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); }