diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-10-10 12:02:33 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-10-10 12:02:33 +1100 |
commit | 8719c43b52be7ee4a483a324615d92cc25fabf7e (patch) | |
tree | f216ff82800703321a78857b90ac7ee43d3f4a75 | |
parent | bc8e70f3622eb3ddbaeb43030ea4ce6e99afd8b6 (diff) |
Inline temporary variable
-rw-r--r-- | app/models/exim_log.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/exim_log.rb b/app/models/exim_log.rb index e52d3c017..0c129139e 100644 --- a/app/models/exim_log.rb +++ b/app/models/exim_log.rb @@ -56,10 +56,8 @@ class EximLog < ActiveRecord::Base done.save! # scan the file - f = is_gz ? Zlib::GzipReader.open(file_name) : File.open(file_name, 'r') - order = 0 - for line in f + (is_gz ? Zlib::GzipReader.open(file_name) : File.open(file_name, 'r')).each do |line| order = order + 1 email_domain = Configuration::incoming_email_domain emails = line.scan(/request-[^\s]+@#{email_domain}/).sort.uniq |