summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-19 12:20:38 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-19 12:20:38 +0000
commit42ad60bc61de60ed2d1e3b0ba6809d55bba89db1 (patch)
treef0fddd46b83d6ef08cb86f59cbd66efd3d1851fa /test
parent5d58894c1e1064d0592ddedf2428f6c13eb5da08 (diff)
merge revision(s) 27891:
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/dl/test_handle.rb12
1 files changed, 10 insertions, 2 deletions
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