summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb
index 6007157878..7d59577d97 100644
--- a/test/rdoc/test_rdoc_rubygems_hook.rb
+++ b/test/rdoc/test_rdoc_rubygems_hook.rb
@@ -132,8 +132,12 @@ class TestRDocRubygemsHook < Gem::TestCase
def test_generate_default_gem
Gem::Deprecate.skip_during do
- @a.loaded_from =
- File.join Gem.default_specifications_dir, 'a.gemspec'
+ if Gem.respond_to?(:default_specifications_dir)
+ klass = Gem
+ else
+ klass = Gem::Specification
+ end
+ @a.loaded_from = File.join klass.default_specifications_dir, 'a.gemspec'
end
@hook.generate