From fb793640922f46bc352526cef5685e6aba6da844 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 5 Jan 2015 15:15:48 +0000 Subject: test_handle.rb: separate blocks * test/fiddle/test_handle.rb (test_static_sym, test_NEXT): separate each rescue blocks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/fiddle/test_handle.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/fiddle') diff --git a/test/fiddle/test_handle.rb b/test/fiddle/test_handle.rb index 129a57398a..3bfdff2e67 100644 --- a/test/fiddle/test_handle.rb +++ b/test/fiddle/test_handle.rb @@ -33,11 +33,15 @@ module Fiddle # Linux / Darwin / FreeBSD refute_nil Fiddle::Handle.sym('dlopen') assert_equal Fiddle::Handle.sym('dlopen'), Fiddle::Handle['dlopen'] + return rescue + end # NetBSD require 'objspace' refute_nil Fiddle::Handle.sym('Init_objspace') assert_equal Fiddle::Handle.sym('Init_objspace'), Fiddle::Handle['Init_objspace'] + return + rescue end end unless /mswin|mingw/ =~ RUBY_PLATFORM @@ -150,7 +154,10 @@ module Fiddle # --- Ubuntu Linux 8.04 dlsym(3) handle = Handle::NEXT refute_nil handle['malloc'] + return rescue + end + begin # BSD # # If dlsym() is called with the special handle RTLD_NEXT, then the search @@ -167,6 +174,8 @@ module Fiddle require 'objspace' handle = Handle::NEXT refute_nil handle['Init_objspace'] + return + rescue end end unless /mswin|mingw/ =~ RUBY_PLATFORM -- cgit v1.2.3