I cannot get my head around this - not sure what I'm doing wrong...
code is -
puts "text needed" text = gets.chomp puts "redact" redact = gets.chomp words = text.split(" ") words.each do |word| if words == redact print "REDACTED" else print words + " " end end
It tells me - 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!).