1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

remove duplication in warning

* dir.c (sys_warning_1): remove duplication in the message.
* error.c (rb_mod_sys_fail_str): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-02-03 06:15:51 +00:00
parent 45df1c24d2
commit 338bd4cc65
2 changed files with 1 additions and 2 deletions

2
dir.c
View file

@ -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;
}

View file

@ -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);