Yes, each is not an enumerable. I wanted to change that, but I believe the
next version of resque is coming with a better implementation so I don't
think that improving what's already done will make much difference in the
future... Just bug fixes

On Thursday, April 24, 2014, Simon Eskildsen <notifications@github.com>
wrote:

> In test/resque_failure_redis_test.rb:
>
> > +
> > +    test "should iterate over the failed tasks with ids in order" do
> > +      ids = []
> > +      Resque::Failure::Redis.each(0, 3, :failed, nil, 'asc') do |id, _|
> > +        ids << id
> > +      end
> > +      assert_equal([0,1,2], ids)
> > +    end
> > +  end
> > +
> > +  context 'order desc' do
> > +    test "should iterate over the failed tasks with ids in reverse order" do
> > +      ids = []
> > +      Resque::Failure::Redis.each(2, 3, :failed, nil, 'desc') do |id, _|
> > +        ids << id
> > +      end
>
> I suppose this isn't an enumerable since you aren't calling to_a?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/resque/resque/pull/1206/files#r11968669>
> .
>