Execution expired (Course task)

Hi Guys,

I am getting “execution expired” when running this loop. As far as I see it is almost identical to their solution. What are your thoughts?

puts "Please write your name" text = gets.chomp puts "Please write your redacted word" redact = gets.chomp words = text.split(" ") words.each do |word| if word == redact print "REDACTED" else print word + " " end end

[/codebyte]

Hey there,

2 things I can think of:

  • Did you write anything when prompted in the console?
  • I’d make sure to follow the guidelines on this one, if I remember right I ran into a similar kind of issue. Mind the name of the variables that you use, and what you print.

Thanks for your reply buddy!

I refreshed the browser and re-ran it and it works nicely. I didn’t think I could find any issue in the code so it was confusing. Anyway all good. Thanks again