diff options
author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-31 02:24:10 +0000 |
---|---|---|
committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-31 02:24:10 +0000 |
commit | 56baa173ec48b63821da78bc941f0bc18b31fad5 (patch) | |
tree | 6c528cb14d0d5d50c585e74037bc7737e82abd0e /lib/rdoc/parsers | |
parent | 53bdd18c259eba6ad17c4a6ec29c7ad2724786b5 (diff) | |
download | ruby-56baa173ec48b63821da78bc941f0bc18b31fad5.tar.gz ruby-56baa173ec48b63821da78bc941f0bc18b31fad5.tar.xz ruby-56baa173ec48b63821da78bc941f0bc18b31fad5.zip |
Make file in '// in sss.c' relative
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/parsers')
-rw-r--r-- | lib/rdoc/parsers/parse_c.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |