mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
2 changed files with 7 additions and 2 deletions
|
@ -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>
|
||||
|
||||
* lib/rdoc/ri/ri_formatter.rb (RI::TextFormatter::display_flow_item):
|
||||
|
|
|
@ -360,8 +360,8 @@ module RDoc
|
|||
|
||||
def find_override_comment(meth_name)
|
||||
comment = nil
|
||||
puts "Override #{meth_name}"
|
||||
if @body =~ %r{Document-method:\s#{meth_name}.*?\n((?>.*?\*/))}m
|
||||
name = Regexp.escape(meth_name)
|
||||
if @body =~ %r{Document-method:\s#{name}.*?\n((?>.*?\*/))}m
|
||||
comment = $1
|
||||
end
|
||||
comment
|
||||
|
|
Loading…
Reference in a new issue