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 | 75c89b7eefd32e609b8141541a3cc22bb1c5d6f7 (patch) | |
tree | bf8f4487140755e3255a9e061873cc7e45728c6b /lib | |
parent | e97d0b7764969431782fadf6c074ee867583efa0 (diff) | |
download | ruby-75c89b7eefd32e609b8141541a3cc22bb1c5d6f7.tar.gz |
* lib/ftools.rb (compare): don't return with a file opened
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@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) |