From 6327183361b7fe143fcb28fefa21360fa1c5daf5 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 17 Jan 2015 00:00:53 +0000 Subject: rbinstall.rb: load zlib earlier * tool/rbinstall.rb: try to load zlib before using Gem::Installer, not to let LoadError raise during autoloading. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/rbinstall.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index c60e4ad395..43efc15671 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -19,6 +19,11 @@ require 'optparse' require 'optparse/shellwords' require 'ostruct' require 'rubygems' +begin + require "zlib" +rescue LoadError + $" << "zlib.rb" +end STDOUT.sync = true File.umask(0) @@ -739,11 +744,6 @@ install?(:ext, :comm, :gem) do prepare "bundle gems", gem_dir, directories install_dir = with_destdir(gem_dir) installed_gems = {} - begin - require "zlib" - rescue LoadError - $" << "zlib.rb" - end Gem::Specification.each_spec([srcdir+'/gems/*']) do |spec| ins = RbInstall::UnpackedInstaller.new(spec, :install_dir => install_dir, -- cgit v1.2.3