From bed34b3a52afde6d98fcef19e199d0af293577be Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 25 Jun 2024 11:50:03 +0900 Subject: Show the detail info in the first line --- error.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'error.c') diff --git a/error.c b/error.c index f1dca2d86d..dc720856c8 100644 --- a/error.c +++ b/error.c @@ -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); -- cgit v1.2.3