mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/socket/ancdata.c (ancillary_unix_rights): check message type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8746e342bc
commit
2ba6eec1fa
3 changed files with 20 additions and 0 deletions
|
@ -55,4 +55,12 @@ class TestSocketAncData < Test::Unit::TestCase
|
|||
assert(!ancdata.cmsg_is?(:IP, :PKTINFO))
|
||||
end
|
||||
end
|
||||
|
||||
if defined?(Socket::SCM_RIGHTS) && defined?(Socket::SCM_TIMESTAMP)
|
||||
def test_unix_rights
|
||||
assert_raise(TypeError) {
|
||||
Socket::AncillaryData.int(:UNIX, :SOL_SOCKET, :TIMESTAMP, 1).unix_rights
|
||||
}
|
||||
end
|
||||
end
|
||||
end if defined? Socket::AncillaryData
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue