diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index e77704aa0a..e952eea776 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -57,15 +57,6 @@ module Bundler nil end - def spec_missing_extensions?(spec, default = true) - return spec.missing_extensions? if spec.respond_to?(:missing_extensions?) - - return false if spec.default_gem? - return false if spec.extensions.empty? - - default - end - def stub_set_spec(stub, spec) stub.instance_variable_set(:@spec, spec) end diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 3b934adbb2..ef36efb3f4 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -210,7 +210,7 @@ module Bundler checkout end - generate_bin_options = { disable_extensions: !Bundler.rubygems.spec_missing_extensions?(spec), build_args: options[:build_args] } + generate_bin_options = { disable_extensions: !spec.missing_extensions?, build_args: options[:build_args] } generate_bin(spec, generate_bin_options) requires_checkout? ? spec.post_install_message : nil diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 3b6ef8bd58..4219bda3bd 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -357,7 +357,7 @@ module Bundler @installed_specs ||= Index.build do |idx| Bundler.rubygems.installed_specs.reverse_each do |spec| spec.source = self - if Bundler.rubygems.spec_missing_extensions?(spec, false) + if spec.missing_extensions? Bundler.ui.debug "Source #{self} is ignoring #{spec} because it is missing extensions" next end