* file.c (file_expand_path): Refix r28102: this breaks
r28039. test for [ruby-dev:41429] is added. [ruby-core:30516] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d16fc7ca69
commit
455554b64c
@ -1,3 +1,8 @@
|
|||||||
|
Mon May 31 15:07:18 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (file_expand_path): Refix r28102: this breaks
|
||||||
|
r28039. test for [ruby-dev:41429] is added. [ruby-core:30516]
|
||||||
|
|
||||||
Mon May 31 14:47:09 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
Mon May 31 14:47:09 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (rb_str_inspect): inspect as ASCII when the codepoint
|
* string.c (rb_str_inspect): inspect as ASCII when the codepoint
|
||||||
|
5
file.c
5
file.c
@ -2887,7 +2887,8 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
|
|||||||
xfree(dir);
|
xfree(dir);
|
||||||
rb_enc_associate_index(result, rb_filesystem_encindex());
|
rb_enc_associate_index(result, rb_filesystem_encindex());
|
||||||
}
|
}
|
||||||
else rb_enc_check(result, fname);
|
else
|
||||||
|
rb_enc_associate(result, rb_enc_check(result, fname));
|
||||||
p = chompdirsep(skiproot(buf));
|
p = chompdirsep(skiproot(buf));
|
||||||
s += 2;
|
s += 2;
|
||||||
}
|
}
|
||||||
@ -2897,7 +2898,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
|
|||||||
if (!NIL_P(dname)) {
|
if (!NIL_P(dname)) {
|
||||||
file_expand_path(dname, Qnil, abs_mode, result);
|
file_expand_path(dname, Qnil, abs_mode, result);
|
||||||
BUFINIT();
|
BUFINIT();
|
||||||
rb_enc_check(result, fname);
|
rb_enc_associate(result, rb_enc_check(result, fname));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char *dir = my_getcwd();
|
char *dir = my_getcwd();
|
||||||
|
@ -42,6 +42,8 @@ class TestPath < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
assert_equal("//", File.expand_path(".", "//"))
|
assert_equal("//", File.expand_path(".", "//"))
|
||||||
assert_equal("//sub", File.expand_path("sub", "//"))
|
assert_equal("//sub", File.expand_path("sub", "//"))
|
||||||
|
|
||||||
|
assert_equal("/tmp/\u3042", File.expand_path("\u3042", "/tmp"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_dirname
|
def test_dirname
|
||||||
|
Loading…
x
Reference in New Issue
Block a user