diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-30 13:01:35 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-30 13:01:35 +0000 |
commit | 8da8d4b043c37b53a69803c71ff36b478d4776d0 (patch) | |
tree | 7c8cec15645e74f19c88e4eb5b210b96174c7d03 /lib/rubygems/config_file.rb | |
parent | c5cb386eba6d9a2d9a8e6ffa8c30137d0c4660c1 (diff) |
Merge RubyGems 3.0.0.beta1.
* It drop to support < Ruby 2.2
* Cleanup deprecated methods and classes.
* Mark obsoleted methods to deprecate.
* and other enhancements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/config_file.rb')
-rw-r--r-- | lib/rubygems/config_file.rb | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index c0d19dbfc2..c0fe3d8964 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -48,7 +48,7 @@ class Gem::ConfigFile # For Ruby packagers to set configuration defaults. Set in # rubygems/defaults/operating_system.rb - OPERATING_SYSTEM_DEFAULTS = {} + OPERATING_SYSTEM_DEFAULTS = Gem.operating_system_defaults ## # For Ruby implementers to set configuration defaults. Set in @@ -63,26 +63,7 @@ class Gem::ConfigFile require "etc" Etc.sysconfdir rescue LoadError, NoMethodError - begin - # TODO: remove after we drop 1.8.7 and 1.9.1 - require 'Win32API' - - CSIDL_COMMON_APPDATA = 0x0023 - path = 0.chr * 260 - if RUBY_VERSION > '1.9' then - SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP', - 'L', :stdcall - SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path - else - SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP', - 'L' - SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path - end - - path.strip - rescue LoadError - RbConfig::CONFIG["sysconfdir"] || "/etc" - end + RbConfig::CONFIG["sysconfdir"] || "/etc" end # :startdoc: |