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

read may return nil

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2015-11-20 23:51:44 +00:00
parent ba772af0a6
commit 9ddeb957fd

View file

@ -325,7 +325,7 @@ module Test
def deal(io, type, result, rep, shutting_down = false) def deal(io, type, result, rep, shutting_down = false)
worker = @workers_hash[io] worker = @workers_hash[io]
cmd = worker.read cmd = worker.read
cmd.sub!(/\A\.+/, '') cmd.sub!(/\A\.+/, '') if cmd # read may return nil
case cmd case cmd
when '' when ''
# just only dots, ignore # just only dots, ignore