From: Gunther Diemant Date: 2011-04-21T20:59:45+09:00 Subject: Re: error: undefined method It seems that you call splitDot as class method and not inside another instance method. But you define splitDot to be an instance method. Try def self.splitDot(s) s.split '.' end PS: Maybe even better: remove the splitDot method completly and use the split method directly: text.each { |t| array = t.split('.') } 2011/4/21, Siratinee Sukachai : > Yeah, I'm sorry. Actually, I mean the code is > > class ConvertToYaml > ... > text.each{|t| > array = splitDot(t) > } > ... > > private > > def splitDot(s) > return s.split('.') > end > end > > -- > Posted via http://www.ruby-forum.com/. > >