summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-07 23:22:28 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-07 23:22:28 +0000
commit5bef9c08898008ec889357cad553d5a0e5196c22 (patch)
tree2f1276ff520500abdb44d1554d16dade0bad4a43 /lib
parentc70bc55ef71f51125deb7a390b8c53b4340e03a3 (diff)
downloadruby-5bef9c08898008ec889357cad553d5a0e5196c22.tar.gz
ruby-5bef9c08898008ec889357cad553d5a0e5196c22.tar.xz
ruby-5bef9c08898008ec889357cad553d5a0e5196c22.zip
add a test for Kernel.open(Pathname.new(...)) { ... }.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/pathname.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb
index 423b8a068..20cff4f09 100644
--- a/lib/pathname.rb
+++ b/lib/pathname.rb
@@ -1182,5 +1182,9 @@ if $0 == __FILE__
assert_not_same(str, obj.to_s)
assert_not_same(obj.to_s, obj.to_s)
end
+
+ def test_kernel_open
+ assert_equal(1, Kernel.open(Pathname.new("/dev/null")) {|f| 1 })
+ end
end
end