From: Per-erik Martin Date: 2013-05-13T20:47:05+09:00 Subject: Re: Enum#each issue Love U Ruby wrote in post #1108761: > I am not able to understand why I am getting the error for the method > http://www.ruby-doc.org/core-1.9.3/Enumerator.html#method-i-each as > below: > > e = "string".to_enum > e.each{|i| p i} > > so.rb:2:in `each': undefined method `each' for "string":String > (NoMethodError) > from so.rb:2:in `
' > > Can anyone help me to understand what wrong I did here? Well, as already pointed out, a string does not have an "each" method. What are you trying to do? What result did you expect? -- Posted via http://www.ruby-forum.com/.