Code doesn't work


Is there a bug on this section? Code doesn't work :confused:

puts "Text 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 "

Redacted 1. what we will be building

No bugs. I would suggest re-read the entire unit and get aquainted with what is expected. The code is perfect; almost too perfect given the usage on the right.

how do you do?

is hardly a word, and it is not in the text to search through.