From 7eb7f063a4ff88ca08e2abe0d2f190cec50107dc Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 19 May 2010 10:15:38 +0000 Subject: Fix test to follow the behavior of NetBSD's dlsym. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dl/test_handle.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test/dl') diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb index a128805521..75edb10534 100644 --- a/test/dl/test_handle.rb +++ b/test/dl/test_handle.rb @@ -23,8 +23,16 @@ module DL 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 -- cgit v1.2.3