about summary refs log tree commit homepage
path: root/lib/rainbows.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows.rb')
-rw-r--r--lib/rainbows.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows.rb b/lib/rainbows.rb
index 5aae746..dd7cf1b 100644
--- a/lib/rainbows.rb
+++ b/lib/rainbows.rb
@@ -85,7 +85,7 @@ module Rainbows
     # to by the (non-frozen) Unicorn::HttpRequest::LOCALHOST constant.
     def addr(io)
       io.respond_to?(:peeraddr) ?
-                        io.peeraddr.last : Unicorn::HttpRequest::LOCALHOST
+                        io.peeraddr[-1] : Unicorn::HttpRequest::LOCALHOST
     end
 
     # the default max body size is 1 megabyte (1024 * 1024 bytes)