I'm trying to get out of a while loop when the input is this:
BYE
BYE
BYE
And not this:
BYE BYE BYE
The code is:
my_reply = ((word1 = gets) + (word2 = gets) + (word3 = gets))
while my_reply != ((word1 == 'BYE') and (word2 == 'BYE') and (word3 == 'BYE'))
puts 'Grandma: ...'
my_reply = ((word1 = gets) + (word2 = gets) + (word3 = gets))
end
puts 'Grandma: ' + 'Fine, sonny, don\'t hang out with your aging grandmother!'.upcase
which is not working. I need help.