From: Ryan Leavengood Date: 2007-04-01T05:59:28+09:00 Subject: Re: Noob question - Sending args to a method? On 3/31/07, dwyer@o2.ie wrote: > The following code leads to an error - > > temp.rb:5:in `*': String can't be coerced into Fixnum (TypeError) > > can someone explain the error to me so I can determine how to resolve it, Thanks a million! > > def c_f(temp) > convert=((9/5)*temp)+32 > print "the coverted fig is ", convert > end > temp=gets.chomp > Integer(temp) > c_f(temp) Calling Integer(temp) does not modify temp. I think you mean something like: c_f(Integer(temp)) or c_f(temp.to_i) Ryan