[前][次][番号順一覧][スレッド一覧]

ruby-changes:25945

From: naruse <ko1@a...>
Date: Fri, 30 Nov 2012 03:23:02 +0900 (JST)
Subject: [ruby-changes:25945] naruse:r38002 (trunk): Run another process to avoid failure when objspace is already loaded

naruse	2012-11-30 03:22:52 +0900 (Fri, 30 Nov 2012)

  New Revision: 38002

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38002

  Log:
    Run another process to avoid failure when objspace is already loaded

  Modified files:
    trunk/test/dl/test_handle.rb

Index: test/dl/test_handle.rb
===================================================================
--- test/dl/test_handle.rb	(revision 38001)
+++ test/dl/test_handle.rb	(revision 38002)
@@ -1,4 +1,5 @@
 require_relative 'test_base'
+require_relative '../ruby/envutil'
 
 module DL
   class TestHandle < TestBase
@@ -158,9 +159,11 @@
         # 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#<DL::Handle:0x[0-9a-f]+>\z/, out + err)
       end
     end unless /mswin|mingw/ =~ RUBY_PLATFORM
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]