commit 4a2e9d13f8c74534ccfa9d398a880dbeb5ed8deb
parent 496d4859ff656e4aa41993ddbe031b29d58f179f
Author: Gaute Hope <eg@gaute.vetsj.com>
Date: Mon, 13 Jan 2014 12:00:21 +0100
mbox: remove deperacted enumerator.new
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
@@ -161,7 +161,7 @@ class MBox < Source
## TODO optimize this by iterating over allterms list backwards or
## storing source_info negated
def last_indexed_message
- benchmark(:mbox_read_index) { Enumerator.new(Index.instance, :each_source_info, self.id).map(&:to_i).max }
+ benchmark(:mbox_read_index) { Index.instance.enum_for(:each_source_info, self.id).map(&:to_i).max }
end
## offset of first new message or nil