From 4fa08bbaf8f2c029f6df7f7ab85293cd31874b15 Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 17 Oct 2013 21:03:49 +0000 Subject: * lib/rubygems: Update to RubyGems master f738c67. Changes: Fixed test bug for ruby with ENABLE_SHARED = no * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems.rb | 12 ++++++++++++ lib/rubygems/basic_specification.rb | 11 ++--------- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 7ad35c0c4c..1c84356bd7 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -438,6 +438,18 @@ module Gem File.umask old_umask end + ## + # The extension API version of ruby. This includes the static vs non-static + # distinction as extensions cannot be shared between the two. + + def self.extension_api_version # :nodoc: + if 'no' == RbConfig::CONFIG['ENABLE_SHARED'] then + "#{ruby_api_version}-static" + else + ruby_api_version + end + end + ## # Returns a list of paths matching +glob+ that can be used by a gem to pick # up features from other gems. For example: diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index 5afa7ee14c..7f738155c9 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -63,15 +63,8 @@ class Gem::BasicSpecification # end def extension_install_dir - ruby_api_version = - if 'no' == RbConfig::CONFIG['ENABLE_SHARED'] then - "#{Gem.ruby_api_version}-static" - else - Gem.ruby_api_version - end - File.join base_dir, 'extensions', Gem::Platform.local.to_s, - ruby_api_version, full_name + Gem.extension_api_version, full_name end def find_full_gem_path # :nodoc: @@ -184,7 +177,7 @@ class Gem::BasicSpecification relative_extension_install_dir = File.join '..', '..', '..', 'extensions', Gem::Platform.local.to_s, - Gem.ruby_api_version, full_name + Gem.extension_api_version, full_name @require_paths + [relative_extension_install_dir] end -- cgit v1.2.3