diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-28 09:29:26 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-28 09:29:26 +0000 |
commit | 2e3f5375232927f797dd6bb8012ef73e693df639 (patch) | |
tree | e378059c80a7e05837ce341f7bccc2178a978356 /test/socket | |
parent | 47da798d84f2eceea4dcda61c62180505899d9c1 (diff) | |
download | ruby-2e3f5375232927f797dd6bb8012ef73e693df639.tar.gz ruby-2e3f5375232927f797dd6bb8012ef73e693df639.tar.xz ruby-2e3f5375232927f797dd6bb8012ef73e693df639.zip |
* ext/socket/ancdata.c (ancillary_unix_rights): check message type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket')
-rw-r--r-- | test/socket/test_ancdata.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/socket/test_ancdata.rb b/test/socket/test_ancdata.rb index 0c1029f1d..112b0c9e5 100644 --- a/test/socket/test_ancdata.rb +++ b/test/socket/test_ancdata.rb @@ -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 |