From: Abder-Rahman Ali Date: 2010-07-13T20:30:18+09:00 Subject: Re: Why do I get undefined method? Peter Hickman wrote: > year = gets > > returns a string but your function requires a fixnum > > so try > > year = gets.to_i > > this is one of the few times that you have to explicitly convert > types. It doesn't happen alot in ruby and each time it catches me out Thanks a lot Peter, that solves it. And, thanks for you other for your replies. -- Posted via http://www.ruby-forum.com/.