2/6 variable error


#1

I'm getting the error "Did you declare a variable called text?"

puts "Text to search through: "
text = gets.chomp
puts "Word to redact: "
redact = gets.chomp
end

Not sure what I'm doing wrong.


#2

The code so far does not open a block, so end is out of place and not needed.


#3

That worked! Thank you!