diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-21 05:54:08 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-21 05:54:08 +0000 |
| commit | a2adff3ba7c47f9b750f23185760a34d59f548e0 (patch) | |
| tree | 545030cf055afc4bc6cc7dcb6c22c51c31c46884 | |
| parent | 548a6feac8fb0aab4146c0646bf0dfb13fe488d0 (diff) | |
| download | ruby-a2adff3ba7c47f9b750f23185760a34d59f548e0.tar.gz ruby-a2adff3ba7c47f9b750f23185760a34d59f548e0.tar.xz ruby-a2adff3ba7c47f9b750f23185760a34d59f548e0.zip | |
* lib/pathname.rb (test_kernel_open): use File.identical?.
[ruby-talk:171804]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/pathname.rb | 10 |
2 files changed, 8 insertions, 7 deletions
@@ -1,3 +1,8 @@ +Wed Dec 21 14:53:26 2005 Tanaka Akira <akr@m17n.org> + + * lib/pathname.rb (test_kernel_open): use File.identical?. + [ruby-talk:171804] + Tue Dec 20 22:41:17 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> * eval.c (eval_under_i): evaluate source in caller's frame. 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) |
