As long as their number isn't negative

print "Enter your favourite number: "
puts  "My favourite is: #{gets.next}"

For decimals, it won't be 1 more, but rather the last digit will be
incremented.