summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/error.c b/error.c
index 88b8a0653e..59c6fa7dd6 100644
--- a/error.c
+++ b/error.c
@@ -1085,7 +1085,7 @@ die(void)
RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 0)
static void
-rb_bug_without_die(const char *fmt, va_list args)
+rb_bug_without_die_internal(const char *fmt, va_list args)
{
const char *file = NULL;
int line = 0;
@@ -1098,11 +1098,20 @@ rb_bug_without_die(const char *fmt, va_list args)
}
void
+rb_bug_without_die(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ rb_bug_without_die_internal(fmt, args);
+ va_end(args);
+}
+
+void
rb_bug(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- rb_bug_without_die(fmt, args);
+ rb_bug_without_die_internal(fmt, args);
va_end(args);
die();
}