summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-20 23:51:44 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-20 23:51:44 +0000
commit9ddeb957fd99115496bc6d676f7e2ec479739576 (patch)
treecb0bc368b18de8fd86c5f02847faa594f5e59923 /test/lib
parentba772af0a6b36713077799e5c5cbcb375d4ee1c8 (diff)
read may return nil
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/test/unit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb
index 2cd554b..d886f29 100644
--- a/test/lib/test/unit.rb
+++ b/test/lib/test/unit.rb
@@ -325,7 +325,7 @@ module Test
def deal(io, type, result, rep, shutting_down = false)
worker = @workers_hash[io]
cmd = worker.read
- cmd.sub!(/\A\.+/, '')
+ cmd.sub!(/\A\.+/, '') if cmd # read may return nil
case cmd
when ''
# just only dots, ignore