diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-13 14:37:11 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-13 14:37:11 +0000 |
| commit | d8ea613a49efb3139615aedc8f374b96b66ee01b (patch) | |
| tree | 985de2824e0df6ace9009bae1d3093405f917a35 /ext | |
| parent | b740c019b0c5f042620b36b0f61635efb5621e2a (diff) | |
| download | ruby-d8ea613a49efb3139615aedc8f374b96b66ee01b.tar.gz ruby-d8ea613a49efb3139615aedc8f374b96b66ee01b.tar.xz ruby-d8ea613a49efb3139615aedc8f374b96b66ee01b.zip | |
* ext/dl/win32/lib/Win32API.rb (Win32API#initialize): DL.dlopen
raises DLError.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/dl/win32/lib/Win32API.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/dl/win32/lib/Win32API.rb b/ext/dl/win32/lib/Win32API.rb index b642e0c8f..97f6c5135 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) |
