mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
3e8687a2ad
commit
fb79364092
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue