In Ruby - I want to prompt a user but have the response be evaluated and if not returned as an Integer have it reply as such. It doesn't seem to be working.
print ('what is your age: ')
age = gets
if age.is_a?(Integer)
puts ("your age is #{age}")
else
puts ("you need to use a number!")
end