aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems.rb12
-rw-r--r--lib/rubygems/basic_specification.rb11
2 files changed, 14 insertions, 9 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 7ad35c0c4c..1c84356bd7 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -439,6 +439,18 @@ module Gem
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