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

sample/test.rb: fix standalone

* sample/test.rb (Progress#initialize): no rotators when STDOUT is
  also tty, that is directly invoked but not from tool/rubytest.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-07-11 09:02:06 +00:00
parent c9e4da2afc
commit dea582458a

View file

@ -17,7 +17,7 @@ class Progress
@quiet = true
end
end
@tty = STDERR.tty? && /dumb/ !~ ENV["TERM"]
@tty = STDERR.tty? && !STDOUT.tty? && /dumb/ !~ ENV["TERM"]
case @color
when nil
@color = @tty