diff options
Diffstat (limited to 'ext/purelib.rb')
-rw-r--r-- | ext/purelib.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/purelib.rb b/ext/purelib.rb index dbe514c34a..6418fd618d 100644 --- a/ext/purelib.rb +++ b/ext/purelib.rb @@ -6,5 +6,12 @@ $:.each_with_index {|path, index| end } if nul - $:[nul..-1] = ["."] + removed, $:[nul..-1] = $:[nul..-1], ["."] + if defined?(Gem::QuickLoader) + removed.each do |path| + # replaces a fake rubygems by gem_prelude.rb with an alternative path + index = $".index(File.join(path, 'rubygems.rb')) + $"[index] = Gem::QuickLoader.path_to_full_rubygems_library if index + end + end end |