diff options
Diffstat (limited to 'lib/rubygems/basic_specification.rb')
-rw-r--r-- | lib/rubygems/basic_specification.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index a52377ff22..470a6ebc8b 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -207,6 +207,24 @@ class Gem::BasicSpecification end ## + # Returns the paths to the source files for use with analysis and + # documentation tools. These paths are relative to full_gem_path. + + def source_paths + paths = raw_require_paths.dup + + if @extensions then + ext_dirs = @extensions.map do |extension| + extension.split(File::SEPARATOR, 2).first + end.uniq + + paths.concat ext_dirs + end + + paths.uniq + end + + ## # Return a Gem::Specification from this gem def to_spec |