diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-05 15:15:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-05 15:15:48 +0000 |
commit | fb793640922f46bc352526cef5685e6aba6da844 (patch) | |
tree | 9448565a66f2571073b3006463250809dc30e1ec /test/fiddle | |
parent | 3e8687a2adc9fd4dbdb5306191a1622b1c8155b3 (diff) | |
download | ruby-fb793640922f46bc352526cef5685e6aba6da844.tar.gz |
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
Diffstat (limited to 'test/fiddle')
-rw-r--r-- | test/fiddle/test_handle.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |