From a860431e3b2a62401b2daef2efb4fe6924213afe Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 12 Jun 2009 05:56:53 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ file.c | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 51d01b95ab..d1b93eb7d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jun 12 14:56:50 2009 Nobuyoshi Nakada + + * file.c (file_expand_path): associate the input encoding when + copying an absolute path. [ruby-dev:38594] + Fri Jun 12 02:41:21 2009 Nobuyoshi Nakada * string.c (str_replace_shared): shared target must be frozen. 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;