Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit e0cfca44c3e623495738b244ef6db4ef9790cfde 1 parent b66bb35
@frodsan frodsan authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/18/socket.rb
View
2  lib/18/socket.rb
@@ -682,6 +682,8 @@ def self.socketpair(domain, type, protocol, klass=self)
else
raise SocketError, "unknown socket type #{type}"
end
+ elsif !type.kind_of? Integer
+ raise Errno::EPROTONOSUPPORT, type.inspect
end
FFI::MemoryPointer.new :int, 2 do |mp|
Please sign in to comment.
Something went wrong with that request. Please try again.