about summary refs log tree commit homepage
path: root/test/test_timerfd.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_timerfd.rb')
-rw-r--r--test/test_timerfd.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_timerfd.rb b/test/test_timerfd.rb
index 7e102c4..e8dc321 100644
--- a/test/test_timerfd.rb
+++ b/test/test_timerfd.rb
@@ -15,6 +15,11 @@ class TestTimerFD < Test::Unit::TestCase
   def test_create
     tfd = TimerFD.new
     assert_kind_of(IO, tfd)
+    if RUBY_VERSION.to_f >= 2.0
+      assert_equal 1, tfd.fcntl(Fcntl::F_GETFD)
+    else
+      assert_equal 0, tfd.fcntl(Fcntl::F_GETFD)
+    end
   end
 
   def test_create_nonblock