From e7f3c86e5aa73d29cd2886da30e0db418358cda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 4 Feb 2015 13:53:46 +0100 Subject: [PATCH] Initialize all load paths in operating_system.rb --- operating_system.rb | 8 ++++++-- ruby.spec | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index 29f223e..ed653fd 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -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 diff --git a/ruby.spec b/ruby.spec index 7200112..d9b0bac 100644 --- a/ruby.spec +++ b/ruby.spec @@ -897,6 +897,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Tue Feb 03 2015 Vít Ondruch - 2.3.0-0.5.r49485 - Upgrade to Ruby 2.3.0 (r49485). +- Initialize all load paths in operating_system.rb. * Tue Feb 03 2015 Vít Ondruch - 2.2.0-5 - Make operating_system.rb more robust.