TJ Wilkes wrote in post #998080:
> Thanks, that was exactly what I needed.
>
> I ended up with:
> def tverify(str, ie)
>   puts "\n"
>   print "Checking for text '", str, "'. "
>   puts "\n"
>

You are doing way to much work with all your print's and puts 
statements.  The lines:

   print "Checking for text '", str, "'. "
   puts "\n"

are equivalent to:

   puts "Checking for text '#{str}'."

Not only is that code easier to type, the code is easier to read, which 
is even more important.  Note that the outer quotes determine if 
variables will be interpolated, not any inner quotes.

And if the quotes get too confusing, you can use %q{} for single quotes, 
and %Q{} for double quotes, like this:

   puts %Q{Checking for text '#{str}'.}

-- 
Posted via http://www.ruby-forum.com/.