mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 19:14:00 +02:00
* 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:
parent
1428b74ff9
commit
6d9b5fdffc
4 changed files with 43 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue