ruby-changes:16519
From: yugui <ko1@a...>
Date: Thu, 1 Jul 2010 16:42:22 +0900 (JST)
Subject: [ruby-changes:16519] Ruby:r28510 (ruby_1_9_2): merges r28456 and r28476 from trunk into ruby_1_9_2.
yugui 2010-07-01 16:42:01 +0900 (Thu, 01 Jul 2010) New Revision: 28510 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28510 Log: merges r28456 and r28476 from trunk into ruby_1_9_2. -- * test/win32ole/test_win32ole_method.rb (test_offset_vtbl): check that Ruby is 32bit or 64bit binary in order to get correct offset value. [ruby-dev:41741] -- * test/win32ole/test_win32ole_method.rb (is_ruby64): check ruby binary is mswin64 or mingw64. [ruby-dev:41756] Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/test/win32ole/test_win32ole_method.rb Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 28509) +++ ruby_1_9_2/ChangeLog (revision 28510) @@ -1,3 +1,14 @@ +Tue Jun 29 19:39:59 2010 Masaki Suketa <masaki.suketa@n...> + + * test/win32ole/test_win32ole_method.rb (is_ruby64): check + ruby binary is mswin64 or mingw64. [ruby-dev:41756] + +Mon Jun 28 20:32:33 2010 Masaki Suketa <masaki.suketa@n...> + + * test/win32ole/test_win32ole_method.rb (test_offset_vtbl): check + that Ruby is 32bit or 64bit binary in order to get correct offset + value. [ruby-dev:41741] + Mon Jun 28 21:56:14 2010 Yusuke Endoh <mame@t...> * thread.c (rb_fd_resize, rb_fd_copy): avoid NULL dereference upon Index: ruby_1_9_2/test/win32ole/test_win32ole_method.rb =================================================================== --- ruby_1_9_2/test/win32ole/test_win32ole_method.rb (revision 28509) +++ ruby_1_9_2/test/win32ole/test_win32ole_method.rb (revision 28510) @@ -108,28 +108,12 @@ assert_equal(1610743810, @m_namespace.dispid) end - def is_win64? - if /win64$/ =~ RUBY_PLATFORM - return true - end - require 'Win32API' - get_current_process = Win32API.new('kernel32', 'GetCurrentProcess', nil, 'i') - handle = get_current_process.call - is_wow64 = false - begin - is_wow64_process = Win32API.new('Kernel32', 'IsWow64Process', ['i', 'p'], 'i') - bool = "\0\0\0\0" - if is_wow64_process.call(handle, bool) != 0 - is_wow64 = bool != "\0\0\0\0" - end - rescue RuntimeError - # no IsWow64Process - end - is_wow64 + def is_ruby64? + /mswin64|mingw64/ =~ RUBY_PLATFORM end def test_offset_vtbl - exp = is_win64? ? 48 : 24 + exp = is_ruby64? ? 48 : 24 assert_equal(exp, @m_invoke.offset_vtbl) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/