summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pathname.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/pathname.rb b/lib/pathname.rb
index b21abd746..9b339aaf6 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)