I have a function like this ...
def f(str)
if str =~ %r{/CVS/}
puts "CVS Directory"
end
end
When I run this through RDoc and view the source, I see ...
def f(str)
if str =~ %{/CVS/}
puts "CVS Directory"
end
end
In case you missed it, the difference is subtle. %r{CVS} is a regular expression in the first, but RDoc prints it as %{CVS}, which is just a quoted string.
···
--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)