about summary refs log tree commit homepage
path: root/test/test_epoll.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_epoll.rb')
-rw-r--r--test/test_epoll.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_epoll.rb b/test/test_epoll.rb
index 61b6e8c..48dd0ad 100644
--- a/test/test_epoll.rb
+++ b/test/test_epoll.rb
@@ -343,6 +343,13 @@ class TestEpoll < Testcase
     @ep.close
     io = Epoll.new(Epoll::CLOEXEC).to_io
     assert((io.fcntl(Fcntl::F_GETFD) & Fcntl::FD_CLOEXEC) == Fcntl::FD_CLOEXEC)
+    io.close
+
+    # prettier, slower, but more memory efficient due to lack of caching
+    # due to the constant cache:
+    io = Epoll.new(:CLOEXEC).to_io
+
+    assert((io.fcntl(Fcntl::F_GETFD) & Fcntl::FD_CLOEXEC) == Fcntl::FD_CLOEXEC)
   end
 
   def test_new