From 37440963f9fa5df3d666967faad1109b8b7e8791 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 31 Dec 2003 02:28:11 +0000 Subject: Fix problem with "// in sss.c" filenames not being relative git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/parsers/parse_c.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb index 0ecd1ce39..4aca5eeb6 100644 --- a/lib/rdoc/parsers/parse_c.rb +++ b/lib/rdoc/parsers/parse_c.rb @@ -133,6 +133,7 @@ module RDoc @options = options @top_level = top_level @classes = Hash.new + @file_dir = File.dirname(file_name) end # Extract the classes/modules and methods from a C file @@ -326,7 +327,8 @@ module RDoc end if source_file - body = (@@known_bodies[source_file] ||= File.read(source_file)) + file_name = File.join(@file_dir, source_file) + body = (@@known_bodies[source_file] ||= File.read(file_name)) else body = @body end -- cgit