aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/config_file.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/config_file.rb')
-rw-r--r--lib/rubygems/config_file.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb
index 3498d06540..1a96356fa8 100644
--- a/lib/rubygems/config_file.rb
+++ b/lib/rubygems/config_file.rb
@@ -47,15 +47,8 @@ class Gem::ConfigFile
system_config_path =
begin
- require 'Win32API'
-
- CSIDL_COMMON_APPDATA = 0x0023
- path = 0.chr * 260
- SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP', 'L',
- :stdcall
- SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path
-
- path.strip
+ require 'etc.so'
+ Etc.sysconfdir
rescue LoadError
'/etc'
end