print " write something\n"
user_input = gets.chomp
if user_input.include? "s"
else print "no S\n"
- Note that I did not use ! after gsub that is user_input is not supposed to change in-place, but still its working.Can anyone enlighten me about how gsub is returning the string/value?
- I did not use any puts or print for the modified string. So how does this code prints the modified string?