From: William Morgan Date: Sun, 24 Feb 2008 22:28:53 +0000 (-0800) Subject: MBox::Loader#next determines labels with self.labels instead of @labels X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=ecfdae994dcae9dcc6c554d9157d7ce5f0c6e188;p=sup MBox::Loader#next determines labels with self.labels instead of @labels This allows subclasses to define fixed #labels methods rather than having to set a shared instance variable (which is one of the few features of Ruby I actively hate.) SentLoader does this, --- diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb index a66d7b9..4acc064 100644 --- a/lib/sup/mbox/loader.rb +++ b/lib/sup/mbox/loader.rb @@ -147,7 +147,7 @@ class Loader < Source end self.cur_offset = next_offset - [returned_offset, (@labels + [:unread]).uniq] + [returned_offset, (self.labels + [:unread]).uniq] end end