summaryrefslogtreecommitdiff
path: root/ext/win32/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-04 12:26:19 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-04 12:26:19 +0000
commit2e5610353fd3c0067e2528763a53c2a635067f02 (patch)
tree56df745c32c54da5c141e1392a89a04798620259 /ext/win32/lib
parent07f460829a95ac98092ca08dd42fab1a17541aa7 (diff)
* ext/win32/lib/Win32API.rb: Fiddle::Importer is defined in
fiddle/import.rb and it's not loaded implicitly. * ext/win32/lib/Win32API.rb (Win32API#initialize): `import` is a string. * ext/win32/lib/Win32API.rb (Win32API#initialize): Fiddle::Importer::CALL_TYPE_TO_ABI is private constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32/lib')
-rw-r--r--ext/win32/lib/Win32API.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/win32/lib/Win32API.rb b/ext/win32/lib/Win32API.rb
index 2e2b441..8589768 100644
--- a/ext/win32/lib/Win32API.rb
+++ b/ext/win32/lib/Win32API.rb
@@ -2,7 +2,7 @@
# for backward compatibility
warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead" if $VERBOSE
-require 'fiddle'
+require 'fiddle/import'
class Win32API
DLL = {}
@@ -15,9 +15,9 @@ class Win32API
@func = Fiddle::Function.new(
handle[func],
- import.map { |win_type| TYPEMAP[win_type.tr("VPpNnLlIi", "0SSI")] },
+ import.chars.map { |win_type| TYPEMAP[win_type.tr("VPpNnLlIi", "0SSI")] },
TYPEMAP[export.tr("VPpNnLlIi", "0SSI")],
- Fiddle::Importer::CALL_TYPE_TO_ABI[calltype]
+ Fiddle::Importer.const_get(:CALL_TYPE_TO_ABI)[calltype]
)
rescue Fiddle::DLError => e
raise LoadError, e.message, e.backtrace