Skip to content

Commit 73206d5

Browse files
committed
Use Specification#source_paths when available
This allows RDoc to generate documentation correctly when using RubyGems 2.2 which doesn't return source paths in Specification#require_paths.
1 parent 06b3f6a commit 73206d5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/rdoc/rubygems_hook.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,13 @@ def generate
153153
options = nil
154154

155155
args = @spec.rdoc_options
156-
args.concat @spec.require_paths
156+
157+
if @spec.respond_to? :source_paths then
158+
args.concat @spec.source_paths
159+
else
160+
args.concat @spec.require_paths
161+
end
162+
157163
args.concat @spec.extra_rdoc_files
158164

159165
case config_args = Gem.configuration[:rdoc]

0 commit comments

Comments
 (0)