Whats wrong with this code - setting up the branch part 2


#1

this my code foe setting up the if branch part 2
print "please enter text!"
user_input = gets.chomp.downcase
if user_input.include?"s"
user_input.gsub!(/s/ "th")
end


#2

Hi this line

user_input.gsub!(/s/ "th")

in the () here

(/s/ "th")

you shoudl put a , between /s/ and "th"


#3

aw didn't realise that, thanks


#4

You might wanna do ".downcase!" instead of ".downcase" cuz as long as you won't make the changes permanent, your program will consider "HE'S GOOD" and "he's good" different and won't be able to distinguish between capitals and smalls and would cause you problem.