From 40bae2f67c1160e1e59018c1003d014c60d1ee47 Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 29 Nov 2012 18:22:52 +0000 Subject: Run another process to avoid failure when objspace is already loaded git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dl/test_handle.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb index cc4df49c84..e94083fab4 100644 --- a/test/dl/test_handle.rb +++ b/test/dl/test_handle.rb @@ -1,4 +1,5 @@ require_relative 'test_base' +require_relative '../ruby/envutil' module DL class TestHandle < TestBase @@ -158,9 +159,11 @@ module DL # interface, below, should be used, since getpid() is a function and not a # data object.) # --- FreeBSD 8.0 dlsym(3) - require 'objspace' - handle = DL::Handle::NEXT - assert_not_nil handle['Init_objspace'] + out, err = capture_io do + require 'objspace' + print DL::Handle::NEXT.inspect + end + assert_match(/\A#\z/, out + err) end end unless /mswin|mingw/ =~ RUBY_PLATFORM -- cgit v1.2.3