If anyone could please help me with some sort of syntax error. While this code was accepted, it isn't running properly. None of the words i type are printed to the screen, REDACTED is printed once for every letter i type, then followed by the individual letters comprising the texts. i feel it has something to do with my .each loop, specifically words.each do |word|... any thoughts?
puts "Please define texts." text = gets.chomp puts "word to redact" redact = gets.chomp words = text.split ("") words.each do |word| if words = redact print "REDACTED " else print words + "" end end .