1
0
Fork 0
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:
nobu 2010-03-14 22:39:25 +00:00
parent 0f418eaa25
commit 6a1a02ae83

View file

@ -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