ruby-changes:15950
From: naruse <ko1@a...>
Date: Wed, 19 May 2010 19:15:45 +0900 (JST)
Subject: [ruby-changes:15950] Ruby:r27891 (trunk): Fix test to follow the behavior of NetBSD's dlsym.
naruse 2010-05-19 19:15:38 +0900 (Wed, 19 May 2010) New Revision: 27891 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27891 Log: Fix test to follow the behavior of NetBSD's dlsym. Modified files: trunk/test/dl/test_handle.rb Index: test/dl/test_handle.rb =================================================================== --- test/dl/test_handle.rb (revision 27890) +++ test/dl/test_handle.rb (revision 27891) @@ -23,8 +23,16 @@ def test_static_sym skip "DL::Handle.sym is not supported" if /mswin|mingw/ =~ RUBY_PLATFORM - assert_not_nil DL::Handle.sym('dlopen') - assert_equal DL::Handle.sym('dlopen'), DL::Handle['dlopen'] + begin + # Linux / Darwin / FreeBSD + assert_not_nil DL::Handle.sym('dlopen') + assert_equal DL::Handle.sym('dlopen'), DL::Handle['dlopen'] + rescue + # NetBSD + require 'objspace' + assert_not_nil DL::Handle.sym('Init_objspace') + assert_equal DL::Handle.sym('Init_objspace'), DL::Handle['Init_objspace'] + end end def test_sym_closed_handle -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/