mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/pathname.rb (Pathname#each_filename): use split_names properly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bea93efc42
commit
cb8d34855e
3 changed files with 12 additions and 1 deletions
|
@ -458,4 +458,10 @@ class TestPathname < Test::Unit::TestCase
|
|||
assert_equal(1, count)
|
||||
assert_equal(2, result)
|
||||
end
|
||||
|
||||
def test_each_filename
|
||||
result = []
|
||||
Pathname.new("/usr/bin/ruby").each_filename {|f| result << f }
|
||||
assert_equal(%w[usr bin ruby], result)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue