summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-03 14:40:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-03 14:40:05 +0000
commita75bc36dd27006ef5534da44c1cf2af4a1cbd171 (patch)
tree00fde6ce366951e07bf0b7ff00b4636d269c4cf2 /file.c
parent71b3abeba3230f123598971dc6fc945c046663da (diff)
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
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
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;