From 07feaee646e061f27dceccc1c06262c2e832f560 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 23 Feb 2011 19:42:58 +0000 Subject: [PATCH] test: fix GC test for systems without POSIX_MQ#to_io Not all systems can convert POSIX_MQ to IO objects. --- test/test_posix_mq.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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" -- 2.11.4.GIT