diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-10 01:35:56 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-10 01:35:56 +0000 |
commit | 9e53a0b142f06540ee886ccf107299bdfc2ca3d6 (patch) | |
tree | 14a5755440df23d9f773f2e0ea5246b07981671a /lib/test | |
parent | 6e5f49770c9b9be151e3142a575abe99a69b0d14 (diff) | |
download | ruby-9e53a0b142f06540ee886ccf107299bdfc2ca3d6.tar.gz |
* lib/test/unit.rb (Test::Unit::Runner::Worker#read): fix for the case
when IO#read or IO#gets returns nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test')
-rw-r--r-- | lib/test/unit.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb index 5114e401d9..a69c039cc3 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -274,7 +274,8 @@ module Test end def read - ((@status == :quit) ? @io.read : @io.gets).chomp + res = (@status == :quit) ? @io.read : @io.gets + res && res.chomp end def close |