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

envutil.rb: avoid error on OS X 10.10

* test/ruby/envutil.rb (diagnostic_reports): Mac OS X 10.10 may
  not create plist file with crash file together.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-06-10 14:44:26 +00:00
parent 2c9c6271e8
commit 9ada2641c6

View file

@ -202,7 +202,7 @@ module EnvUtil
log = File.read(name) rescue next
if /\AProcess:\s+#{cmd} \[#{pid}\]$/ =~ log
File.unlink(name)
File.unlink("#{path}/.#{File.basename(name)}.plist")
File.unlink("#{path}/.#{File.basename(name)}.plist") rescue nil
return log
end
end