Where the forum in french? for exercice 5/6


#1

this is my code :smile:

puts "Entrer un texte:"
texte = gets.chomp
puts " Mots à cacher "
cacher = gets.chomp
mots = texte.split(" ")
mots.each do |mots|

if mots == cacher
print "INFO.CONFIDENTIELLE"
else print += ""
end

(it doesn't work ! )
I don't understand what's is wrong? THANK for your help.


#2

What are you trying to do with this line?

Also, you're missing an end to close your each do.