summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-15 00:56:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-15 00:56:36 +0000
commit65672e63f52dc09c62eb2b75d5d24f710a30ee6e (patch)
tree20202c195ef900c5a73fcb01aea7bfdc9a2f8996 /sample
parenta8ddde3b7802702414a7ea602720199de76051f1 (diff)
downloadruby-65672e63f52dc09c62eb2b75d5d24f710a30ee6e.tar.gz
test: unknown --color argument
* bootstraptest/runner.rb (main): warn unknown --color argument. * sample/test.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rwxr-xr-xsample/test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/sample/test.rb b/sample/test.rb
index b32a16430a..839343e868 100755
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -8,8 +8,9 @@ PROGRESS = Object.new
PROGRESS.instance_eval do
@color = nil
case ARGV[0]
- when /\A--color(?:=(?:always|(auto)|(never)))?\z/
- @color = (!$2 unless $1)
+ when /\A--color(?:=(?:always|(auto)|(never)|(.*)))?\z/
+ warn "unknown --color argument: #$3" if $3
+ @color = $1 ? nil : !$2
end
@count = 0
@rotator = %w[- \\ | /]