diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-02 13:28:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-02 13:28:10 +0000 |
commit | 232ced73424dd968aa6d3884bae00db1d5ce06b8 (patch) | |
tree | 6132698be38474ec99f932a6ff5c52afb116a018 /lib/rdoc | |
parent | 166fedb45d6f08f4f2eaca3de53c14180f92afbb (diff) |
* lib/rdoc/parser/c.rb (RDoc#handle_method): see source files in
source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/parser/c.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb index d115ac65a5..0f728ed9f2 100644 --- a/lib/rdoc/parser/c.rb +++ b/lib/rdoc/parser/c.rb @@ -393,7 +393,7 @@ class RDoc::Parser::C < RDoc::Parser elsif @content =~ %r{Document-(?:class|module):\s+#{class_name}\s*?(?:<\s+[:,\w]+)?\n((?>.*?\*/))}m then comment = $1 elsif @content =~ %r{((?>/\*.*?\*/\s+)) - ([\w\.\s]+\s* = \s+)?rb_define_(class|module).*?"(#{class_name})"}xm then + ([\w\.\s]+\s* = \s+)?rb_define_(class|module).*?"(#{class_name})"}xm then # " comment = $1 end @@ -611,8 +611,7 @@ class RDoc::Parser::C < RDoc::Parser meth_obj.params = "(" + (1..p_count).map{|i| "p#{i}"}.join(", ") + ")" end - if source_file and File.exist? source_file then - file_name = File.join(@file_dir, source_file) + if source_file and File.exist?(file_name = File.join(@file_dir, source_file)) then body = (@@known_bodies[source_file] ||= File.read(file_name)) elsif source_file then warn "unknown source file #{source_file}" |