diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-20 08:59:59 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-20 08:59:59 +0000 |
commit | 8ce8e86562b7a040ee77de08a758879b096b663a (patch) | |
tree | 169c1d0117cf2bd7dce1c2c4a6740a5df05480cd /lib | |
parent | d5f21b6ab3ba492774172cf5170f857d69c475c2 (diff) |
* lib/ftools.rb (compare): don't return with a file opened
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftools.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ftools.rb b/lib/ftools.rb index 1b06bf5ecb..6e1c886e56 100644 --- a/lib/ftools.rb +++ b/lib/ftools.rb @@ -81,14 +81,14 @@ class << File def compare from, to, verbose = false $stderr.print from, " <=> ", to, "\n" if verbose + return false if stat(from).size != stat(to).size + from = open(from, "rb") to = open(to, "rb") ret = false fr = tr = '' - return false if from.stat.size != to.stat.size - begin while fr == tr fr = from.read(BUFSIZE) |