Redacted 3/4 error message


I get this error message:
It looks like you didn't print each word from the user's text to the console.

for this code

puts "Write a sentence for us to search through: "
text = gets.chomp
puts "Word to redact: "
redact = gets.chomp

words = text.split(" ")

words.each do |word|
if word != redact
print word + " "
print "REDACTED "


Unable to reproduce the error condition given in the OP. Code runs and passes.


found it, one to many spaces between quotation marks

print word + " "