1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

envutil.rb: basename for diagnostic_reports

* test/lib/envutil.rb (EnvUtil.diagnostic_reports): diagnostic
  report file uses base name only.  [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-03-14 04:16:02 +00:00
parent a7d6470f35
commit 04eb385192

View file

@ -233,8 +233,8 @@ module EnvUtil
def self.diagnostic_reports(signame, pid, now)
return unless %w[ABRT QUIT SEGV ILL TRAP].include?(signame)
cmd = rubybin
cmd = @ruby_install_name if %r{/ruby-runner#{Regexp.quote(RbConfig::CONFIG["EXEEXT"])}\z}o =~ cmd
cmd = File.basename(rubybin)
cmd = @ruby_install_name if "ruby-runner#{RbConfig::CONFIG["EXEEXT"]}" == cmd
path = DIAGNOSTIC_REPORTS_PATH
timeformat = DIAGNOSTIC_REPORTS_TIMEFORMAT
pat = "#{path}/#{cmd}_#{now.strftime(timeformat)}[-_]*.crash"