summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-23 00:03:42 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-23 00:03:42 +0000
commitc1785306e1dd5b771126aa469594d54c6fdc55e9 (patch)
tree9ab10a31bcca7374615f35c67f6418a3d4617855 /test
parent0d9eecdb1a9427741b4f8c0f3a42c007510b6dd0 (diff)
downloadruby-c1785306e1dd5b771126aa469594d54c6fdc55e9.tar.gz
ruby-c1785306e1dd5b771126aa469594d54c6fdc55e9.tar.xz
ruby-c1785306e1dd5b771126aa469594d54c6fdc55e9.zip
* lib/pathname.rb (each_filename): return Enumerator if no block
given. * test/pathname/test_pathname.rb: add a test for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/pathname/test_pathname.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 11c1bb7b2..da12383bd 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -481,6 +481,7 @@ class TestPathname < Test::Unit::TestCase
result = []
Pathname.new("/usr/bin/ruby").each_filename {|f| result << f }
assert_equal(%w[usr bin ruby], result)
+ assert_equal(%w[usr bin ruby], Pathname.new("/usr/bin/ruby").each_filename.to_a)
end
def test_kernel_pathname