ruby-changes:36189
From: usa <ko1@a...>
Date: Tue, 4 Nov 2014 21:26:34 +0900 (JST)
Subject: [ruby-changes:36189] usa:r48270 (trunk): * ext/win32/lib/Win32API.rb: Fiddle::Importer is defined in
usa 2014-11-04 21:26:19 +0900 (Tue, 04 Nov 2014) New Revision: 48270 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48270 Log: * 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. Modified files: trunk/ChangeLog trunk/ext/win32/lib/Win32API.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 48269) +++ ChangeLog (revision 48270) @@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Nov 4 21:23:22 2014 NAKAMURA Usaku <usa@r...> + + * 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. + Tue Nov 4 21:20:07 2014 NAKAMURA Usaku <usa@r...> * lib/securerandom.rb (SecureRandom.random_bytes): use fiddle directly Index: ext/win32/lib/Win32API.rb =================================================================== --- ext/win32/lib/Win32API.rb (revision 48269) +++ ext/win32/lib/Win32API.rb (revision 48270) @@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/Win32API.rb#L2 # 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 https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/Win32API.rb#L15 @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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/