It looks right but I'm getting an error message? Can you tell me what to fix and why?
Oops, try again. 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!).
Replace this line with your code. text = gets.chomp puts text redact = gets.chomp puts redact words = text.split (" ") words.each do |word| if word != redact print word + (" ") else print "REDACTED" end end