From a75bc36dd27006ef5534da44c1cf2af4a1cbd171 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 3 Jun 2017 14:40:05 +0000 Subject: file.c: preserve encoding * file.c (path_check_0): preserve encoding of path name in warning message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 7d2d9e88bf..31e5971894 100644 --- a/file.c +++ b/file.c @@ -5634,9 +5634,9 @@ path_check_0(VALUE path, int execpath) && !(p && execpath && (st.st_mode & S_ISVTX)) #endif && !access(p0, W_OK)) { - rb_warn("Insecure world writable dir %s in %sPATH, mode 0%" - PRI_MODET_PREFIX"o", - p0, (execpath ? "" : "LOAD_"), st.st_mode); + rb_enc_warn(enc, "Insecure world writable dir %s in %sPATH, mode 0%" + PRI_MODET_PREFIX"o", + p0, (execpath ? "" : "LOAD_"), st.st_mode); if (p) *p = '/'; RB_GC_GUARD(path); return 0; -- cgit v1.2.3