This blog is part of our Ruby 2.4 series.
In Ruby 2.3, These methods do not return enumerator when no block is given.
Some methods raise exception because of this behavior.
Ruby 2.4 fixed this issue.
As we can see, these methods now return an enumerator when no block is given.
In Ruby 2.4 following code will not raise any exception.