From: Brian Candler Date: 2008-10-21T00:18:40+09:00 Subject: Re: newbie adding to array question Roger Reeks wrote: > thanks for the help up to now, much appreciated > > i want to modify the code so it can pu > > 1.is_fibonacci # returns true > 2.is_fibonacci # returns true > 3.is_fibonacci # returns false > > how could i do that? class Integer def is_fibonacci(x=1, y=1) ... put your code here ... the number you are testing is "self" end end -- Posted via http://www.ruby-forum.com/.