Öğreniyorum Ruby.str.each in Ruby çalışmıyor
http://ruby-doc.org/core/classes/String.html numaralı telefondan String#each
yöntemini buldum.
bunu kullanmayı deneyin
...irb(main):001:0> "hello\nworld".each {|s| p s}
NoMethodError: undefined method `each' for "hello\nworld":String
... ama NoMethodError
olsun.
Ruby 1.9.1p253 kullanıyorum, bu yüzden eski bir sürüm kullanmıyorum. Neler oluyor?
'Dize # her bir satır tarafından yinelenen, değil char. – sepp2k