diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-06-25 11:50:03 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-06-25 11:50:03 +0900 |
commit | bed34b3a52afde6d98fcef19e199d0af293577be (patch) | |
tree | eb34df8756d7fc119434f1018e1d4372d9867d8a /error.c | |
parent | 250fc1223c4dc293f8759ddedce9cba7841f1474 (diff) |
Show the detail info in the first line
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1176,14 +1176,16 @@ rb_assert_failure_detail(const char *file, int line, const char *name, const cha FILE *out = stderr; fprintf(out, "Assertion Failed: %s:%d:", file, line); if (name) fprintf(out, "%s:", name); - fprintf(out, "%s\n%s\n\n", expr, rb_dynamic_description); + fputs(expr, out); if (fmt && *fmt) { va_list args; va_start(args, fmt); + fputs(": ", out); vfprintf(out, fmt, args); va_end(args); } + fprintf(out, "\n%s\n\n", rb_dynamic_description); preface_dump(out); rb_vm_bugreport(NULL, out); |