Permalink
Browse files

Pass fully qualified constants to #setsockopt

Fixes #396.
  • Loading branch information...
1 parent 578b8b5 commit 7ef2f9bf4fddb5a57ded374fb7af0d0a958fee25 @mhoran mhoran committed with p Nov 22, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/capybara/webkit/connection.rb
  2. +1 −1 spec/connection_spec.rb
@@ -113,7 +113,7 @@ def connect
def attempt_connect
@socket = @socket_class.open("127.0.0.1", @port)
if defined?(Socket::TCP_NODELAY)
- @socket.setsockopt(:IPPROTO_TCP, :TCP_NODELAY, 1)
+ @socket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, true)
end
rescue Errno::ECONNREFUSED
end
@@ -38,7 +38,7 @@
socket = stub('socket')
TCPSocket.stub(:open).and_return(socket)
if defined?(Socket::TCP_NODELAY)
- socket.should_receive(:setsockopt).with(:IPPROTO_TCP, :TCP_NODELAY, 1)
+ socket.should_receive(:setsockopt).with(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, true)
else
socket.should_not_receive(:setsockopt)
end

0 comments on commit 7ef2f9b

Please sign in to comment.