Hi,

----------------------------------------------------------------------------------------
C:\desenvolvimento>type pow.rb
require 'win32/registry'
Win32::Registry::HKEY_LOCAL_MACHINE.open('Software\GTK\2.0')


C:\desenvolvimento>ruby -v
ruby 1.8.2 (2005-05-01) [i386-mswin32]

C:\desenvolvimento>ruby pow.rb
c:/desenvolvimento/ruby/lib/ruby/1.8/win32/registry.rb:420: [BUG] Segmentation f
ault
ruby 1.8.2 (2005-05-01) [i386-mswin32]


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.




C:\desenvolvimento>ruby -v
ruby 1.9.0 (2005-05-01) [i386-mswin32]

C:\desenvolvimento>ruby pow.rb
c:/desenvolvimento/ruby/lib/ruby/1.9/win32/registry.rb:420: [BUG] Segmentation f
ault
ruby 1.9.0 (2005-05-01) [i386-mswin32]


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.




C:\desenvolvimento>ruby -v
ruby 1.8.2 (2004-12-25) [i386-mswin32]

C:\desenvolvimento>ruby pow.rb

C:\desenvolvimento>
-------------------------------------------------------------------------------

Environment:
- Win XP SP2
- Ruby 1.9 HEAD, Ruby 1.8.2 Stable Snapshot, Ruby 1.8.2 Stable Release
(December)
- Free MS Optimizing Compiler:
C:\>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

All three Ruby versions have been compiled in this environment. The
1.8.2 Stable Release does not crash. Ruby 1.9 HEAD and Ruby 1.8.2
Stable Snapshot do crash.

I hope someone can reproduce this with other versions of the Microsoft
Compiler and hopefully find what is causing them. My version of the
compiler can be found at:
http://www.rubygarden.org/ruby?WindowsCompiler

BTW, a Ruby version compiled with MinGW does not crash.

Cheers,
Joao