Fix deprecation warning on ruby 2.0.

"Enumerator.new without a block is deprecated; use Object#to_enum"