lib/sup/mbox.rb in sup-0.15.2 vs lib/sup/mbox.rb in sup-0.15.3
- old
+ new
@@ -159,10 +159,10 @@
end
## 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
def first_new_message
next_offset(last_indexed_message || 0)