From: Edoardo Rossi Date: 2013-05-13T21:23:40+09:00 Subject: Re: Enum#each issue On Mon, May 13, 2013 at 2:16 PM, Hans Mackowiak wrote: > you did something wrong again: > > e = "string".to_enum #=> # > e.next #NoMethodError: undefined method `each' for "string":String > > -- > Posted via http://www.ruby-forum.com/. > to_enum will allow you to define and create a new Enumerator for the object. Then you can enumerate that obj by calling that method on obj. The default is :each As in docs: "to_enum(method = :each, *args)" But this implies that your object respond_to :each ... I hope this helps ... e.