diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-08 15:35:59 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-08 15:35:59 +0000 |
commit | 6f53e25c7c3c206d31dd4489ddc347ddd772e3d4 (patch) | |
tree | 8b421033a37a5211151424ae716e7caf2660e684 /eval.c | |
parent | 226a7a81d6b824b4d9f4953ef4f9fd8e13fe7964 (diff) |
merges r24403 and r24439 from trunk into ruby_1_9_1.
--
* eval.c (rb_exc_raise, rb_exc_fatal): require exception object.
[ruby-core:24767]
--
* eval.c (rb_exc_raise, rb_exc_fatal): nil is used to reraise.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -413,12 +413,18 @@ rb_longjmp(int tag, VALUE mesg) void rb_exc_raise(VALUE mesg) { + if (!NIL_P(mesg)) { + mesg = rb_make_exception(1, &mesg); + } rb_longjmp(TAG_RAISE, mesg); } void rb_exc_fatal(VALUE mesg) { + if (!NIL_P(mesg)) { + mesg = rb_make_exception(1, &mesg); + } rb_longjmp(TAG_FATAL, mesg); } |