Fix warning: Enumerator.new without a block is deprecated; use Object#to_enum