From 1fb7ce63031d2a2180b2706dd2185c741b0ff365 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 13 Feb 2009 14:37:11 +0000 Subject: [PATCH] * ext/dl/win32/lib/Win32API.rb (Win32API#initialize): DL.dlopen raises DLError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/dl/win32/lib/Win32API.rb | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index fa11bdf511..e37eadb878 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Feb 13 23:37:10 2009 Nobuyoshi Nakada + + * ext/dl/win32/lib/Win32API.rb (Win32API#initialize): DL.dlopen + raises DLError. + Fri Feb 13 21:13:19 2009 Tanaka Akira * ext/socket/socket.c (Init_socket): define TCPServer#listen and diff --git a/ext/dl/win32/lib/Win32API.rb b/ext/dl/win32/lib/Win32API.rb index b642e0c8fe..97f6c5135b 100644 --- a/ext/dl/win32/lib/Win32API.rb +++ b/ext/dl/win32/lib/Win32API.rb @@ -12,6 +12,8 @@ class Win32API @proto = [import].join.tr("VPpNnLlIi", "0SSI").sub(/^(.)0*$/, '\1') handle = DLL[dllname] ||= DL.dlopen(dllname) @func = DL::CFunc.new(handle[func], TYPEMAP[export.tr("VPpNnLlIi", "0SSI")], func) + rescue DL::DLError => e + raise LoadError, e.message, e.backtrace end def call(*args)