From cb8d34855e7374f7a28b115f8d3a5e2020072f0e Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 22 Feb 2006 12:18:58 +0000 Subject: * 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 --- test/pathname/test_pathname.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/pathname') diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb index 94ddbcd9cf..20351fa0f8 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 -- cgit v1.2.3