Permalink
Browse files

Fix File#identical? to check the device before comparing inode numbers

  • Loading branch information...
1 parent 1b151fe commit 291baa5d46b9e320de29ef9dd571632883acb485 @eregon eregon committed May 29, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 kernel/common/file.rb
View
@@ -616,6 +616,7 @@ def self.identical?(orig, copy)
return false if st_o.nil? || st_c.nil?
+ return false unless st_o.dev == st_c.dev
return false unless st_o.ino == st_c.ino
return false unless st_o.ftype == st_c.ftype
return false unless POSIX.access(orig, Constants::R_OK)

0 comments on commit 291baa5

Please sign in to comment.