Redacted! lesson. I'm doing something wrong and I'm not sure what


puts "This is what you're looking for: "

puts "Redacted: "

words=text.split(" ")
words=['bus', 'hand']
words.each do |word|
print word
if word " "
print "REDACTED"
print word + " "

It allowed me to move on, but the code in action won't actually redact anything I've inputted.

It gives me this error

busundefined method `word' for #


Use a different variable for each input.

This line should be removed.

if word == redact      # or whatever variable you choose to use
    print "REDACTED "  # be sure to include a space character


This helped me understand it a bit better.

Still not very intuitive.


As long as YOU found the solution, and didn't take home a grab bag.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.