зеркало из https://github.com/github/ruby.git
* file.c (file_expand_path): set encoding as the same of fname
when _result_ is not filesystem encoding. [ruby-dev:41429] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
ac8346c4c3
Коммит
84abef0fc0
|
@ -1,3 +1,8 @@
|
|||
Thu May 27 23:29:18 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* file.c (file_expand_path): set encoding as the same of fname
|
||||
when _result_ is not filesystem encoding. [ruby-dev:41429]
|
||||
|
||||
Thu May 27 23:07:45 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* file.c (file_expand_path): use rb_enc_associate_index and
|
||||
|
|
2
file.c
2
file.c
|
@ -2895,6 +2895,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
|
|||
xfree(dir);
|
||||
rb_enc_associate_index(result, rb_filesystem_encindex());
|
||||
}
|
||||
else rb_enc_copy(result, fname);
|
||||
p = chompdirsep(skiproot(buf));
|
||||
s += 2;
|
||||
}
|
||||
|
@ -2904,6 +2905,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
|
|||
if (!NIL_P(dname)) {
|
||||
file_expand_path(dname, Qnil, abs_mode, result);
|
||||
BUFINIT();
|
||||
rb_enc_copy(result, fname);
|
||||
}
|
||||
else {
|
||||
char *dir = my_getcwd();
|
||||
|
|
Загрузка…
Ссылка в новой задаче