summaryrefslogtreecommitdiffstats
path: root/test/pathname/test_pathname.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-22 12:18:58 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-22 12:18:58 +0000
commit7cf9b49638f28e3d014deb52f4617dfde051fe1c (patch)
treeb0a5d9b71c1cd68afc270e4cadae97fe01825bec /test/pathname/test_pathname.rb
parent4fcd14efdba33bd3cf0f9c14e1a16aab64b4766f (diff)
downloadruby-7cf9b49638f28e3d014deb52f4617dfde051fe1c.tar.gz
ruby-7cf9b49638f28e3d014deb52f4617dfde051fe1c.tar.xz
ruby-7cf9b49638f28e3d014deb52f4617dfde051fe1c.zip
* lib/pathname.rb (Pathname#each_filename): use split_names properly.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/pathname/test_pathname.rb')
-rw-r--r--test/pathname/test_pathname.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 94ddbcd9c..20351fa0f 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -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