Hi all, This is odd. It looks to me like we have all 4 variations of memcpy set in Windows::MSVCRT::Buffer but somehow this one creeps up. I actually noticed it in a few cases with that earlier mmap sub/replace example, but I wasn''t sure what was happening. Note that windows-api 0.2.3 and windows-pr-0.8.3 are the latest versions in CVS, but this happens with windows-api-0.2.2 and windows-pr-0.8.2 as well. Any ideas? Thanks, Dan C:\Documents and Settings\djberge\workspace\win32-mmap>rake test (in C:/Documents and Settings/djberge/workspace/win32-mmap) c:/ruby/bin/ruby -w -Ilib;test "c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb" "test/ tc_mmap.rb" Loaded suite c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader Started ....FFFF....... Finished in 0.031 seconds. 1) Failure: test_dynamic_array_value(TC_Mmap) [./test/tc_mmap.rb:42]: Exception raised: Class: <TypeError> Message: <"can''t convert String into Integer"> ---Backtrace--- c:/ruby/lib/ruby/gems/1.8/gems/windows-api-0.2.3/lib/windows/api.rb:479: in `call'' c:/ruby/lib/ruby/gems/1.8/gems/windows-api-0.2.3/lib/windows/api.rb:479: in `call'' c:/ruby/lib/ruby/gems/1.8/gems/windows-pr-0.8.3/lib/windows/msvcrt/buffe r.rb:34:in `memcpy'' ./lib/win32/mmap.rb:321:in `method_missing'' ./test/tc_mmap.rb:42:in `test_dynamic_array_value'' ./test/tc_mmap.rb:42:in `test_dynamic_array_value'' --------------- 2) Failure: test_dynamic_hash_value(TC_Mmap) [./test/tc_mmap.rb:35]: Exception raised: Class: <TypeError> Message: <"can''t convert String into Integer"> ---Backtrace--- c:/ruby/lib/ruby/gems/1.8/gems/windows-api-0.2.3/lib/windows/api.rb:479: in `call'' c:/ruby/lib/ruby/gems/1.8/gems/windows-api-0.2.3/lib/windows/api.rb:479: in `call'' c:/ruby/lib/ruby/gems/1.8/gems/windows-pr-0.8.3/lib/windows/msvcrt/buffe r.rb:34:in `memcpy'' ./lib/win32/mmap.rb:321:in `method_missing'' ./test/tc_mmap.rb:35:in `test_dynamic_hash_value'' ./test/tc_mmap.rb:35:in `test_dynamic_hash_value'' --------------- 3) Failure: test_dynamic_integer_value(TC_Mmap) [./test/tc_mmap.rb:28]: Exception raised: Class: <TypeError> Message: <"can''t convert String into Integer"> ---Backtrace--- c:/ruby/lib/ruby/gems/1.8/gems/windows-api-0.2.3/lib/windows/api.rb:479: in `call'' c:/ruby/lib/ruby/gems/1.8/gems/windows-api-0.2.3/lib/windows/api.rb:479: in `call'' c:/ruby/lib/ruby/gems/1.8/gems/windows-pr-0.8.3/lib/windows/msvcrt/buffe r.rb:34:in `memcpy'' ./lib/win32/mmap.rb:321:in `method_missing'' ./test/tc_mmap.rb:28:in `test_dynamic_integer_value'' ./test/tc_mmap.rb:28:in `test_dynamic_integer_value'' --------------- 4) Failure: test_dynamic_string_value(TC_Mmap) [./test/tc_mmap.rb:21]: Exception raised: Class: <TypeError> Message: <"can''t convert String into Integer"> ---Backtrace--- c:/ruby/lib/ruby/gems/1.8/gems/windows-api-0.2.3/lib/windows/api.rb:479: in `call'' c:/ruby/lib/ruby/gems/1.8/gems/windows-api-0.2.3/lib/windows/api.rb:479: in `call'' c:/ruby/lib/ruby/gems/1.8/gems/windows-pr-0.8.3/lib/windows/msvcrt/buffe r.rb:34:in `memcpy'' ./lib/win32/mmap.rb:321:in `method_missing'' ./test/tc_mmap.rb:21:in `test_dynamic_string_value'' ./test/tc_mmap.rb:21:in `test_dynamic_string_value'' --------------- 15 tests, 31 assertions, 4 failures, 0 errors rake aborted! Command failed with status (1): [c:/ruby/bin/ruby -w -Ilib;test "c:/ruby/li...] (See full trace by running task with --trace) This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
> -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Berger, Daniel > Sent: Friday, April 25, 2008 9:31 AM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] win32-mmap test failures > > Hi all, > > This is odd. It looks to me like we have all 4 variations of > memcpy set in Windows::MSVCRT::Buffer but somehow this one > creeps up. I actually noticed it in a few cases with that > earlier mmap sub/replace example, but I wasn''t sure what was > happening.<snip> This is baffling. Somehow it''s failing the src.is_a?(String) check on the marshalled source on line 31 of buffer.rb, even though it definitely _is_ a String. I cannot duplicate this in a standalone script. Ideas? Thanks, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
Hi, 2008/4/26, Berger, Daniel <Daniel.Berger at qwest.com>:> > > > -----Original Message----- > > From: win32utils-devel-bounces at rubyforge.org > > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > > Berger, Daniel > > Sent: Friday, April 25, 2008 9:31 AM > > To: Development and ideas for win32utils projects > > Subject: [Win32utils-devel] win32-mmap test failures > > > > Hi all, > > > > This is odd. It looks to me like we have all 4 variations of > > memcpy set in Windows::MSVCRT::Buffer but somehow this one > > creeps up. I actually noticed it in a few cases with that > > earlier mmap sub/replace example, but I wasn''t sure what was > > happening. > > <snip> > > This is baffling. Somehow it''s failing the src.is_a?(String) check on > the marshalled source on line 31 of buffer.rb, even though it definitely > _is_ a String. I cannot duplicate this in a standalone script. > > Ideas? > > Thanks, > > DanIf you modify src.is_a?(String) to src.class.to_s=="String", it will work. But I don''t know what it means. Regards, Park Heesob -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20080426/f3c6fadf/attachment-0001.html>
Thanks. The only thing I can figure is that it''s some sort of name collision with Windows::MSVCRT::String, but I can''t see how right off the bat. Dan ________________________________ From: win32utils-devel-bounces at rubyforge.org [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of Heesob Park Sent: Friday, April 25, 2008 10:20 AM To: Development and ideas for win32utils projects Subject: Re: [Win32utils-devel] win32-mmap test failures Hi, 2008/4/26, Berger, Daniel <Daniel.Berger at qwest.com>: > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Berger, Daniel > Sent: Friday, April 25, 2008 9:31 AM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] win32-mmap test failures > > Hi all, > > This is odd. It looks to me like we have all 4 variations of > memcpy set in Windows::MSVCRT::Buffer but somehow this one > creeps up. I actually noticed it in a few cases with that > earlier mmap sub/replace example, but I wasn''t sure what was > happening. <snip> This is baffling. Somehow it''s failing the src.is_a?(String) check on the marshalled source on line 31 of buffer.rb, even though it definitely _is_ a String. I cannot duplicate this in a standalone script. Ideas? Thanks, Dan If you modify src.is_a?(String) to src.class.to_s=="String", it will work. But I don''t know what it means. Regards, Park Heesob This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20080425/813ef391/attachment.html>
Yeah, it''s a scope resolution bug of some sort. Using "::String" works. I''ll fix that in the next windows-pr release. Dan PS - Sorry for the top posting (Outlook is being a pain) ________________________________ From: win32utils-devel-bounces at rubyforge.org [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of Berger, Daniel Sent: Friday, April 25, 2008 10:37 AM To: Development and ideas for win32utils projects Subject: Re: [Win32utils-devel] win32-mmap test failures Thanks. The only thing I can figure is that it''s some sort of name collision with Windows::MSVCRT::String, but I can''t see how right off the bat. Dan ________________________________ From: win32utils-devel-bounces at rubyforge.org [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of Heesob Park Sent: Friday, April 25, 2008 10:20 AM To: Development and ideas for win32utils projects Subject: Re: [Win32utils-devel] win32-mmap test failures Hi, 2008/4/26, Berger, Daniel <Daniel.Berger at qwest.com>: > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Berger, Daniel > Sent: Friday, April 25, 2008 9:31 AM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] win32-mmap test failures > > Hi all, > > This is odd. It looks to me like we have all 4 variations of > memcpy set in Windows::MSVCRT::Buffer but somehow this one > creeps up. I actually noticed it in a few cases with that > earlier mmap sub/replace example, but I wasn''t sure what was > happening. <snip> This is baffling. Somehow it''s failing the src.is_a?(String) check on the marshalled source on line 31 of buffer.rb, even though it definitely _is_ a String. I cannot duplicate this in a standalone script. Ideas? Thanks, Dan If you modify src.is_a?(String) to src.class.to_s=="String", it will work. But I don''t know what it means. Regards, Park Heesob This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20080425/0fdaf13a/attachment.html>