summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--error.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/error.c b/error.c
index 384a56f5df..e78071c686 100644
--- a/error.c
+++ b/error.c
@@ -3632,12 +3632,13 @@ rb_vraise(VALUE exc, const char *fmt, va_list ap)
}
void
-rb_raise(VALUE exc, const char *fmt, ...)
+rb_raise(VALUE exc_class, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- rb_vraise(exc, fmt, args);
+ VALUE exc = rb_exc_new3(exc_class, rb_vsprintf(fmt, args));
va_end(args);
+ rb_exc_raise(exc);
}
NORETURN(static void raise_loaderror(VALUE path, VALUE mesg));