Skip to content
Browse files

Fix Socket#socketpair when socket type is not a Integer or String X18

  • Loading branch information...
1 parent b66bb35 commit e0cfca44c3e623495738b244ef6db4ef9790cfde Francesco Rodriguez committed Nov 16, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/18/socket.rb
2 lib/18/socket.rb
@@ -682,6 +682,8 @@ def self.socketpair(domain, type, protocol, klass=self)
raise SocketError, "unknown socket type #{type}"
+ elsif !type.kind_of? Integer
+ raise Errno::EPROTONOSUPPORT, type.inspect
end :int, 2 do |mp|

0 comments on commit e0cfca4

Please sign in to comment.
Something went wrong with that request. Please try again.