diff options
-rw-r--r-- | test/test_epoll_io.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_epoll_io.rb b/test/test_epoll_io.rb index daaa229..05a0613 100644 --- a/test/test_epoll_io.rb +++ b/test/test_epoll_io.rb @@ -20,4 +20,16 @@ class TestEpollIO < Test::Unit::TestCase @epio.epoll_wait { |events, obj| ev << [ events, obj ] } assert_equal([[Epoll::OUT, @wr]], ev) end + + class EpSub < Epoll::IO + def self.new + super(SleepyPenguin::Epoll::CLOEXEC) + end + end + + def test_subclass + tmp = EpSub.new + assert_equal Fcntl::FD_CLOEXEC, tmp.fcntl(Fcntl::F_GETFD) + assert_nil tmp.close + end end if defined?(SleepyPenguin::Epoll) |