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
|
@ -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…
Add table
Add a link
Reference in a new issue