My code won't print "REDACTED" in place of the redact variable. I do not know why though. Can anyone shed some light? I appreciate it! Here is my code :
Code:
puts "Whats your input brah?"
text = gets.chomp
puts "Whatchu are you hiding bro?"
redact = gets.chomp
words = text.split(" ")
words.each {|x| if x == redact print "REDACTED"+" " else print x+" "}
Comment