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)
A related bug is this: if there's a comment inside the method, RDoc
will display a blank line after it in the "view source" area.
Let me know if you need more info to reproduce it, Dave.
Gavin
···
On Monday, June 21, 2004, 5:06:25 AM, Jim wrote:
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.
Fixed - thanks for the report.
Cheers
Dave
···
On Jun 20, 2004, at 14:06, Jim Weirich wrote:
def f(str)
if str =~ %r{/CVS/}
puts "CVS Directory"
end
end