make sure we read the whole file

git-svn-id: file:///home/svn/framework3/trunk@10234 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-09-03 23:00:28 +00:00
parent b24a7db785
commit e42d2c1ef4
1 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ end
def extract_words(wordfile)
return [] unless wordfile && File.readable?(wordfile)
begin
words = File.open(wordfile) {|f| f.read}
words = File.open(wordfile) {|f| f.read(f.stat.size)}
rescue
return
end
@ -175,7 +175,7 @@ def extract_word_pair(wordfile)
return [] unless wordfile && File.readable?(wordfile)
creds = []
begin
upfile_contents = File.open(wordfile) {|f| f.read}
upfile_contents = File.open(wordfile) {|f| f.read(f.stat.size)}
rescue
return []
end