I'm super beginner to ruby, but for some reason my if statement isn't working. Whenever the name 'Cristina' is entered, the program continues to print "Hello there".
def Cus_free_makers_eg1heChallenge(str)
str = gets
if str == "Cristina"
print "Hello Cristina!"
else
print "Hello there!"
end
return str
end
if str == "Christina\n". After thegets, the string will have a terminating newline. More sensible would be maybe aif /Christina/ =~ str.