diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/bin/unused_listen | 2 | ||||
-rw-r--r-- | t/hijack.ru | 4 | ||||
-rw-r--r-- | t/sha1-random-size.ru | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/t/bin/unused_listen b/t/bin/unused_listen index b638f54..8cce645 100755 --- a/t/bin/unused_listen +++ b/t/bin/unused_listen @@ -31,7 +31,7 @@ begin # when running tests in parallel with gmake. Create a lock file while # we have the port here to ensure that does not happen. lock_path = "#{Dir::tmpdir}/unicorn_test.#{addr}:#{port}.lock" - lock = File.open(lock_path, File::WRONLY|File::CREAT|File::EXCL, 0600) + File.open(lock_path, File::WRONLY|File::CREAT|File::EXCL, 0600) rescue Errno::EEXIST sock.close rescue nil retry diff --git a/t/hijack.ru b/t/hijack.ru index 64c23d7..16b5f38 100644 --- a/t/hijack.ru +++ b/t/hijack.ru @@ -45,9 +45,9 @@ run lambda { |env| [ 200, { "Content-Length" => r.bytesize.to_s, - "rack.hijack" => proc do |io| + "rack.hijack" => proc do |sock| io.write(r) - lazy_close(io) + lazy_close(sock) end }, DieIfUsed.new diff --git a/t/sha1-random-size.ru b/t/sha1-random-size.ru index 4ef5d7b..9251221 100644 --- a/t/sha1-random-size.ru +++ b/t/sha1-random-size.ru @@ -18,7 +18,7 @@ app = lambda do |env| end while input.read(rand(cap), buf) end when "/each" - input.each { |buf| digest.update(buf) } + input.each { |chunk| digest.update(chunk) } else if buf = input.read(rand(cap)) begin |