summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-16 16:49:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-16 16:49:25 +0000
commit17d31216ea903fa6cd464d16b5f1512479da62c1 (patch)
tree2fbb3e9ecea7f325eb393784cae3509af07d5de0 /test/ruby
parentbf52039259a857870a5e34a351e62591453eabe9 (diff)
dir.c: match plain names as-is
* dir.c (glob_pattern_type): separate names with alphabet but no magical from plain. * dir.c (glob_helper): match plain names as-is to treat super-root same as the root. [ruby-core:61552] [Bug #9648] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_dir.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index b0d848c83f..3f2acb22fc 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -249,6 +249,12 @@ class TestDir < Test::Unit::TestCase
end
end
+ def test_glob_super_root
+ bug9648 = '[ruby-core:61552] [Bug #9648]'
+ roots = Dir.glob("/*")
+ assert_equal(roots.map {|n| "/..#{n}"}, Dir.glob("/../*"), bug9648)
+ end
+
def test_home
env_home = ENV["HOME"]
env_logdir = ENV["LOGDIR"]