about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-02-23 19:42:58 +0000
committerEric Wong <normalperson@yhbt.net>2011-02-23 19:42:58 +0000
commit07feaee646e061f27dceccc1c06262c2e832f560 (patch)
tree0bc135cd329a18bb06eaa807b4ee8fce73c233ff
parentdbded16e7c36b51187f3d0e6981c96773f910de9 (diff)
downloadruby_posix_mq-07feaee646e061f27dceccc1c06262c2e832f560.tar.gz
Not all systems can convert POSIX_MQ to IO objects.
-rw-r--r--test/test_posix_mq.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_posix_mq.rb b/test/test_posix_mq.rb
index 8febb04..e58a212 100644
--- a/test/test_posix_mq.rb
+++ b/test/test_posix_mq.rb
@@ -36,7 +36,10 @@ class Test_POSIX_MQ < Test::Unit::TestCase
   def test_gc
     assert_nothing_raised do
       2025.times { POSIX_MQ.new(@path, :rw) }
-      2025.times { @mq = POSIX_MQ.new(@path, :rw); @mq.to_io }
+      2025.times {
+        @mq = POSIX_MQ.new(@path, :rw)
+        @mq.to_io if @mq.respond_to?(:to_io)
+      }
     end
   end unless defined?RUBY_ENGINE && RUBY_ENGINE == "rbx"