* ext/pathname/pathname.c (path_s_glob): Pathname.glob translated

from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-09-13 20:14:04 +00:00
parent 1428b74ff9
commit 6d9b5fdffc
4 changed files with 43 additions and 9 deletions

View file

@ -1152,6 +1152,10 @@ class TestPathname < Test::Unit::TestCase
open("f", "w") {|f| f.write "abc" }
Dir.mkdir("d")
assert_equal([Pathname("d"), Pathname("f")], Pathname.glob("*").sort)
a = []
Pathname.glob("*") {|path| a << path }
a.sort!
assert_equal([Pathname("d"), Pathname("f")], a)
}
end