From 232ced73424dd968aa6d3884bae00db1d5ce06b8 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 2 Apr 2010 13:28:10 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ lib/rdoc/parser/c.rb | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32517c9123..b4fc7966fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 2 22:28:03 2010 Nobuyoshi Nakada + + * lib/rdoc/parser/c.rb (RDoc#handle_method): see source files in + source directory. + Fri Apr 2 22:13:38 2010 Nobuyoshi Nakada * lib/rdoc/rdoc.rb: reverted r27186 to add generators. 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}"