mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (realpath_internal): regulate separators in prefix.
[ruby-core:28653] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0f418eaa25
commit
6a1a02ae83
1 changed files with 4 additions and 0 deletions
|
@ -164,6 +164,10 @@ class TestFile < Test::Unit::TestCase
|
|||
tst = realdir.sub(/#{Regexp.escape(File::SEPARATOR)}/, '\0\0\0')
|
||||
assert_equal(realdir, File.realpath(tst))
|
||||
assert_equal(realdir, File.realpath(".", tst))
|
||||
if File::ALT_SEPARATOR
|
||||
bug2961 = '[ruby-core:28653]'
|
||||
assert_equal(realdir, File.realpath(realdir.tr(File::SEPARATOR, File::ALT_SEPARATOR)), bug2961)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue