summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-27 18:52:03 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-27 18:52:03 +0000
commit33f634b651febeb73ac5fbe888f4c053c4883c56 (patch)
treecf10ac40cd0e343ee97958c3552f9b772adeae93 /lib
parent69ee29aa518daf09abcd80646e338301321a7105 (diff)
downloadruby-33f634b651febeb73ac5fbe888f4c053c4883c56.tar.gz
ruby-33f634b651febeb73ac5fbe888f4c053c4883c56.tar.xz
ruby-33f634b651febeb73ac5fbe888f4c053c4883c56.zip
Fix quoting of method names in regexp
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/parsers/parse_c.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb
index d28ec941e..086a63f4d 100644
--- a/lib/rdoc/parsers/parse_c.rb
+++ b/lib/rdoc/parsers/parse_c.rb
@@ -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