Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
diff --git i/lib/18/socket.rb w/lib/18/socket.rb
index 52a01fe..c981d9f 100644
--- i/lib/18/socket.rb
+++ w/lib/18/socket.rb
@@ -682,6 +682,8 @@ class Socket < BasicSocket
raise SocketError, "unknown socket type #{type}"
+ elsif !type.kind_of? Integer
+ raise Errno::EPROTONOSUPPORT, type.inspect
end :int, 2 do |mp|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment