summaryrefslogtreecommitdiff
path: root/lib/pathname.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-21 05:54:08 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-21 05:54:08 +0000
commit3144d2a49210dbd57f52c9ce7e1cf793d025b7c1 (patch)
tree545030cf055afc4bc6cc7dcb6c22c51c31c46884 /lib/pathname.rb
parentf1f2012312cc98b9acf2ca4116698e7e0705779e (diff)
* lib/pathname.rb (test_kernel_open): use File.identical?.
[ruby-talk:171804] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pathname.rb')
-rw-r--r--lib/pathname.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb
index b21abd746b..9b339aaf60 100644
--- a/lib/pathname.rb
+++ b/lib/pathname.rb
@@ -1183,14 +1183,10 @@ if $0 == __FILE__
def test_kernel_open
count = 0
- stat1 = File.stat(__FILE__)
result = Kernel.open(Pathname.new(__FILE__)) {|f|
- stat2 = f.stat
- assert_equal(stat1.dev, stat2.dev)
- assert_equal(stat1.ino, stat2.ino)
- assert_equal(stat1.size, stat2.size)
- count += 1
- 2
+ assert(File.identical?(__FILE__, f))
+ count += 1
+ 2
}
assert_equal(1, count)
assert_equal(2, result)