From: Sebastian Hungerecker Date: 2007-07-18T04:44:01+09:00 Subject: Re: Undefined Method confusion - Ruby Newbie (I know it rhymes, don't hurt me) Kaldrenon wrote: > The error I'm getting is this: > undefined method `series' for Test:Class (NoMethodError) > from euler14.rb:14:in `each' > > I see no clear reason why I'm getting this error. Can you un-dumb me? You define series as an instance method, but you try to invoke it as a class method. If you do class Bla def blubb() end end x=Bla.new there will be a x.blubb but no Bla.blubb. If you want a Bla.blubb you have to define it with "def self.blubb". Also given the fact that you never create an instance of your class, you don't actually need to define a class. -- Ist so, weil ist so Bleibt so, weil war so