Ruby 2.6.0 was released this week, and introduces Enumerator::Chain and Enumerable#filter.
The filterer gem already implements the chain and filter methods on an ActiveRecord collection.
On older rubies (<2.6) everything works fine;
# Ruby 2.5.x
> User.where('1=1').chain
=> [#<User:0x00007fe8bbf5f9c3 ... etc as expected.
However, on new rubies (>2.6.0) we see the following problem;
# Ruby 2.6.0
> User.where('1=1').chain
=> #<Enumerator::Chain: ...>
It seems the simplest solution is to rename or avoid the .chain and .filter methods in this gem.
Thoughts?
Ruby
2.6.0was released this week, and introduces Enumerator::Chain and Enumerable#filter.The
filterergem already implements thechainandfiltermethods on an ActiveRecord collection.On older rubies (<2.6) everything works fine;
However, on new rubies (>2.6.0) we see the following problem;
It seems the simplest solution is to rename or avoid the
.chainand.filtermethods in this gem.Thoughts?