From: J-H Johansen Date: 2010-05-29T04:13:57+09:00 Subject: Re: A complete beginners question On Fri, May 28, 2010 at 8:59 PM, Ant Walliams wrote: > Reid Thompson wrote: >> On Sat, May 29, 2010 at 03:29:15AM +0900, Ant Walliams wrote: >>> Hi there, >>> puts 'What is your favourite number?' >>> number = gets.chomp >>> number+=1 >>> puts 'Do you not think' + number + 'is a better number?' >>  puts 'Do you not think' + number.to_s + 'is a better number?' > > Thank for the reply but I am still getting the same error even after > making your changes. Any ideas? > > Thanks > Ant > -- > Posted via http://www.ruby-forum.com/. > > You need to convert the input from String to Fixnum puts "What is your favourite number?" number = gets.chomp.to_i number+=1 puts "Do you not think #{number} is a better number?" -- Jens-Harald Johansen -- There are 10 kinds of people in the world: Those who understand binary and those who don't...