Initialize all load paths in operating_system.rb

This commit is contained in:
Vít Ondruch 2015-02-04 13:53:46 +01:00
parent c8dee5c194
commit 351bd6cd02
2 changed files with 10 additions and 3 deletions

View File

@ -46,8 +46,10 @@ module Gem
RbConfig::CONFIG['libdir']
end
@default_dirs ||= Hash.new do |hash, key|
hash[key] = if path = default_locations[key]
@default_dirs ||= default_locations.inject(Hash.new) do |hash, location|
destination, path = location
hash[destination] = if path
{
:bin_dir => File.join(path, RbConfig::CONFIG['bindir'].split(File::SEPARATOR).last),
:gem_dir => File.join(path, RbConfig::CONFIG['datadir'].split(File::SEPARATOR).last, 'gems'),
@ -60,6 +62,8 @@ module Gem
:ext_dir => ''
}
end
hash
end
end

View File

@ -21,7 +21,7 @@
%endif
%global release 5
%global release 6
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
%global rubygems_version 2.4.5
@ -891,6 +891,9 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/tkextlib
%changelog
* Wed Feb 04 2015 Vít Ondruch <vondruch@redhat.com> - 2.2.0-6
- Initialize all load paths in operating_system.rb.
* Tue Feb 03 2015 Vít Ondruch <vondruch@redhat.com> - 2.2.0-5
- Make operating_system.rb more robust.
- Add RubyGems stub headers for bundled gems.