summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-12 05:56:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-12 05:56:53 +0000
commita860431e3b2a62401b2daef2efb4fe6924213afe (patch)
tree0ab3884a36c8c779d8cdffd9af9f51e6546c1dfd /file.c
parent7915aed8752566f355ab4b19216da96836fd9589 (diff)
* file.c (file_expand_path): associate the input encoding when
copying an absolute path. [ruby-dev:38594] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.c b/file.c
index 5593cad320..ba703d5605 100644
--- a/file.c
+++ b/file.c
@@ -2793,6 +2793,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
p = buf + (s - b);
BUFCHECK(bdiff >= buflen);
memset(buf, '/', p - buf);
+ rb_enc_copy(result, fname);
}
if (p > buf && p[-1] == '/')
--p;