Still says wrong


Thank you for giving your ideas.
But it still says wrong when I try your code in the editor.

it says:
Oops, try again. Make sure to print each word from the user's text to the console unless that word is the word to be redacted; if it is, print REDACTED (all caps!).

Redacted 5/6


Unless your code is strictly identical to @faisalalaloola, I suggest that you start your own thread and post your code in order to get proper help.


the code is working at my place maybe you can try each do instead of {}

words.each do |word|
if word == redact
print "REDACTED "
print word + " "

but different blowers are show different message sometimes


@rita315 @arjofocolovi

So my code looks like this:

puts " Enter a String: "
puts "An other string: "
words=text.split(" ")

words.each do |x|
if x == reduct
print "REDACTED "
print words+" "

And whenever I run it, it says

cannot convert String into Array

Do I have to convert the input into array? using .split??


your print words + "" should be print x+"" because you use |x| as the name for your array


Oh, yeah! It works! Thank you very much!! :smile:


It doesn't matter what type of redact program you write, it gives you that. I've written several, and even cut and pasted some examples from github, and nothing gets rid of that error for me.