Fix quoting of method names in regexp
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3009adaee2
commit
3f3c55f49c
@ -1,3 +1,8 @@
|
|||||||
|
Sun Dec 28 03:50:05 2003 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
|
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::find_override_comment):
|
||||||
|
Escape method names used in regexp
|
||||||
|
|
||||||
Sun Dec 28 01:46:02 2003 Dave Thomas <dave@wireless_3.local.thomases.com>
|
Sun Dec 28 01:46:02 2003 Dave Thomas <dave@wireless_3.local.thomases.com>
|
||||||
|
|
||||||
* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item):
|
* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item):
|
||||||
|
@ -360,8 +360,8 @@ module RDoc
|
|||||||
|
|
||||||
def find_override_comment(meth_name)
|
def find_override_comment(meth_name)
|
||||||
comment = nil
|
comment = nil
|
||||||
puts "Override #{meth_name}"
|
name = Regexp.escape(meth_name)
|
||||||
if @body =~ %r{Document-method:\s#{meth_name}.*?\n((?>.*?\*/))}m
|
if @body =~ %r{Document-method:\s#{name}.*?\n((?>.*?\*/))}m
|
||||||
comment = $1
|
comment = $1
|
||||||
end
|
end
|
||||||
comment
|
comment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user