Trouble with "Redacted!" Lesson 5


Hi everyone, this is my code below. I can't quite figure out what's wrong with it. Any suggestions?

puts "What did you say this time?"
text_1 = gets.chomp
puts "Okay, so how can I help you fix this mess?"
text_2 = gets.chomp

words=text_1.split(" ")
words.each do |word|
if word == text_2
print "REDACTED "
print word + " "


Missing an end for the .each do.


That solved it! Thank you!


A post was split to a new topic: Why my code is not working?