From 0ebfc6f216f86a97d766d9ae2b525bd41b50286f Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 25 Dec 2014 06:36:18 +0000 Subject: dir.c: replace_real_basename * dir.c (replace_real_basename): get the real name and replace the base name with it by getattrlist(2) if available. suggested by Matthew Draper at [ruby-core:67116]. [Bug #10015] * dir.c (glob_helper): get the real name of the whole path, not only the last name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_dir.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 03c62da547..6184f05edb 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -237,16 +237,8 @@ class TestDir < Test::Unit::TestCase return unless File.exist?("filewithcases") assert_equal(%w"FileWithCases", Dir.glob("filewithcases"), feature5994) end - Dir.chdir(File.join(@root, "c")) do - open("FileWithCases", "w") {} - mode = File.stat(".").mode - begin - File.chmod(mode & ~0444, ".") - return if mode == File.stat(".").mode - assert_equal(%w"filewithcases", Dir.glob("filewithcases"), feature5994) - ensure - File.chmod(mode, ".") - end + Dir.chdir(@root) do + assert_equal(%w"a/FileWithCases", Dir.glob("A/filewithcases"), feature5994) end end -- cgit v1.2.3