From 30b839a013a347d5d474217714e313f18dbef08c Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 22 Oct 2015 08:56:30 +0000 Subject: [PATCH] generic_erb.rb: ignore error * tool/generic_erb.rb: ignore error that tput is not found. [ruby-core:71143] [Bug #11611] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/generic_erb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/generic_erb.rb b/tool/generic_erb.rb index 6d97d21fb7..149de3b1b9 100644 --- a/tool/generic_erb.rb +++ b/tool/generic_erb.rb @@ -24,7 +24,7 @@ end unchanged = "unchanged" updated = "updated" if color or (color == nil && STDOUT.tty?) - if /\A(\e\[).*m\z/ =~ IO.popen("tput smso", "r", &:read) + if (/\A(\e\[).*m\z/ =~ IO.popen("tput smso", "r", err: IO::NULL, &:read) rescue nil) beg = $1 colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:\n]*)/)] : {} reset = "#{beg}m"