summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-31 02:24:10 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-31 02:24:10 +0000
commitf5b7214548fc4b07db6a7f5bf14f44ed782f7257 (patch)
tree6c528cb14d0d5d50c585e74037bc7737e82abd0e
parente9a7fd1c92afb7f37a640d01c3f0173c08302fba (diff)
Make file in '// in sss.c' relative
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/rdoc/parsers/parse_c.rb4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d4e8588e2..d4251b36c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Dec 31 11:20:34 2003 <dave@pragprog.com>
+
+ * lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser::do_methods): Make
+ file referenced in "// in sss.c" relative to current file.
+
Wed Dec 31 11:17:37 2003 Dave Thomas <dave@pragprog.com>
* lib/rdoc/generators/html_generator.rb: Fix problem when
diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb
index 0ecd1ce39b..4aca5eeb67 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