diff --git a/dir.c b/dir.c index e983ea2552..a9435f68cf 100644 --- a/dir.c +++ b/dir.c @@ -1081,7 +1081,7 @@ dir_s_rmdir(VALUE obj, VALUE dir) static VALUE sys_warning_1(VALUE mesg) { - rb_sys_warning("%s:%s", strerror(errno), (const char *)mesg); + rb_sys_warning("%s", (const char *)mesg); return Qnil; } diff --git a/error.c b/error.c index 0e8e17b195..662c6d4bee 100644 --- a/error.c +++ b/error.c @@ -2096,7 +2096,6 @@ rb_sys_warning(const char *fmt, ...) if (!RTEST(ruby_verbose)) return; - snprintf(buf, BUFSIZ, "warning: %s", fmt); snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save)); va_start(args, fmt);