Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass fully qualified constants to #setsockopt

Fixes #396.
  • Loading branch information...
commit 7ef2f9bf4fddb5a57ded374fb7af0d0a958fee25 1 parent 578b8b5
@mhoran mhoran authored p committed
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/capybara/webkit/connection.rb
  2. +1 −1  spec/connection_spec.rb
View
2  lib/capybara/webkit/connection.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
View
2  spec/connection_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.