From 6a1a02ae833a2f90e59a6400cb532e49888a80d7 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 14 Mar 2010 22:39:25 +0000 Subject: [PATCH] * 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 --- test/ruby/test_file.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index 90f2ec1f53..ba9549fda5 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -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