diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-17 00:00:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-17 00:00:53 +0000 |
commit | 6327183361b7fe143fcb28fefa21360fa1c5daf5 (patch) | |
tree | 2649b17c61118c9c6c8e56d07f3104ad4e20f2b1 /tool | |
parent | 84a41254717edd0e37c0f9b4e56358737013ed85 (diff) | |
download | ruby-6327183361b7fe143fcb28fefa21360fa1c5daf5.tar.gz |
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
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 10 |
1 files 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, |