diff options
author | Peter Zhu <[email protected]> | 2024-12-11 14:22:36 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-12-12 14:07:56 -0500 |
commit | ca2d19d4e5a47822c250179f88c814c5f401e9bd (patch) | |
tree | c8eaba4f85561bb5ef7fd11008dcb598105d7d0a /error.c | |
parent | c0caf1cc1aaa3ba2e9d09977ee2a51e35114c70f (diff) |
Implement rb_bug_without_die
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12309
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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(); } |