On Sat, Aug 17, 2013 at 3:28 AM, Stu <stu / rubyprogrammer.net> wrote:

> Looks like you need to convert your string into an integer.
>
> age = gets
> age = age.to_i
>
> that should work.
>

OP may also want to do

age = Integer(gets)

This gives feedback if the entered string was not an valid integer number
representation.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/