ruby-changes:57069
From: Nobuyoshi <ko1@a...>
Date: Fri, 16 Aug 2019 07:32:25 +0900 (JST)
Subject: [ruby-changes:57069] Nobuyoshi Nakada: 71fd26b195 (master): Fallback for older Rubygems
https://git.ruby-lang.org/ruby.git/commit/?id=71fd26b195 From 71fd26b1957134588e150d1bfd7b831dc7864e8a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 9 Aug 2019 01:43:51 +0900 Subject: Fallback for older Rubygems diff --git a/test/rdoc/test_rdoc_rubygems_hook.rb b/test/rdoc/test_rdoc_rubygems_hook.rb index 6007157..7d59577 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 https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_rubygems_hook.rb#L132 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/