2f72af218d
Ruby 2.1, post release of Ruby 2.0. *WARNING!* Not all of ruby pkgsrc are supported yet. Ruby 2.1 has many improvements including speedup without severe incompatibilities. You can use this on Rails and other applications, and get a more comfortable experience. This release includes many bugfixes. See tickets and ChangeLog for details. Following the previously announced changed versioning policy of Ruby 2.1, this version is simply called ¡È2.1.1¡É. Update: We¡Çve noticed a regression in Hash#reject. For more details, see: Regression of Hash#reject in Ruby 2.1.1.
40 lines
1.1 KiB
Ruby
40 lines
1.1 KiB
Ruby
$NetBSD: patch-lib_rubygems_config__file.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
|
|
|
* Don't hard code config file's path for gem.
|
|
|
|
--- lib/rubygems/config_file.rb.orig 2013-10-24 14:31:17.000000000 +0000
|
|
+++ lib/rubygems/config_file.rb
|
|
@@ -57,32 +57,7 @@ class Gem::ConfigFile
|
|
|
|
# :stopdoc:
|
|
|
|
- system_config_path =
|
|
- begin
|
|
- 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
|
|
- end
|
|
+ system_config_path = '@PKG_SYSCONFDIR@'
|
|
|
|
# :startdoc:
|
|
|