<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
Make sure to print each word from the user’s text to the console unless that word is the word to be redacted; if it is, print REDACTED (all caps!).
I’ve done this, the output looks correct to me, however I cannot pass this.
What is the text that you would like to search
abc def ghi jkl
What is the string you would like redacted
REDACTED def ghi jkl
CODE: puts "What is the text that you would like to search" text = gets.chomp puts "What is the string you would like redacted" redacted = gets.chomp words = text.split(" ") words.each do |word| if word == redacted print "REDACTED " else print word + " " end end