ruby-changes:46608
From: ko1 <ko1@a...>
Date: Mon, 15 May 2017 16:02:39 +0900 (JST)
Subject: [ruby-changes:46608] ko1:r58723 (trunk): add information for debugging.
ko1 2017-05-15 16:02:33 +0900 (Mon, 15 May 2017) New Revision: 58723 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58723 Log: add information for debugging. Modified files: trunk/test/rubygems/test_gem_gem_runner.rb Index: test/rubygems/test_gem_gem_runner.rb =================================================================== --- test/rubygems/test_gem_gem_runner.rb (revision 58722) +++ test/rubygems/test_gem_gem_runner.rb (revision 58723) @@ -1,17 +1,36 @@ https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_gem_runner.rb#L1 # frozen_string_literal: true require 'rubygems/test_case' begin - require 'rubygems/gem_runner' -ensure - if $! + gem_home_files = lambda{ if Dir.exist?(ENV["GEM_HOME"]) require "find" ary = Find.find(ENV["GEM_HOME"]).to_a - raise <<eom -GEM_HOME: #{ENV["GEM_HOME"]} -contant: #{ary.inspect} -eom + else + [] end + } + prev_gem_home = ENV["GEM_HOME"] + prev_gem_home_files = gem_home_files.call + prev_threads = Thread.list.map{|e| e.inspect} + + require 'rubygems/gem_runner' +ensure + if $! + msg = <<eom +*************** +PREV + GEM_HOME: #{prev_gem_home} + Files in GEM_HOME: #{prev_gem_home_files.inspect} + Threads: #{prev_threads.inspect} +Current: + GEM_HOME: #{ENV["GEM_HOME"]} + Files in GEM_HOME: #{gem_home_files.call} + Threads: #{Thread.list.map{|e| e.inspect}.inspect} +Exception: #{$!.message} +eom + p $!.class + p $!.message.frozen? + raise $!.class, msg, $!.backtrace end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/