From: Masahiro S. <sa...@us...> - 2003-08-30 11:50:12
|
Update of /cvsroot/ruby-gnome2/ruby-gnome2/glib/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv27815/src/lib Modified Files: glib2.rb Log Message: * src/lib/glib2.rb: On mingw32 and mswin32 platform, require 'win32/registry' unconditionaly and rescue LoadError. (proposed by TAMURA.KENICHI <sgs...@ni...>) Index: glib2.rb =================================================================== RCS file: /cvsroot/ruby-gnome2/ruby-gnome2/glib/src/lib/glib2.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- glib2.rb 25 Aug 2003 08:47:36 -0000 1.4 +++ glib2.rb 30 Aug 2003 11:50:06 -0000 1.5 @@ -1,6 +1,6 @@ # for dropline GTK2-Runtime DLL # http://www.dropline.net/gtk/ -if /mingw|mswin/ =~ RUBY_PLATFORM and RUBY_VERSION >= "1.8.0" +if /mingw|mswin/ =~ RUBY_PLATFORM begin require 'win32/registry' GTK2Dir = @@ -8,7 +8,7 @@ ENV['PATH'] = %w(bin lib).collect{|dir| "#{GTK2Dir}\\#{dir};" }.join('') + ENV['PATH'] - rescue Win32::Registry::Error + rescue LoadError, Win32::Registry::Error end end @@ -18,6 +18,7 @@ module GLib class Type + def decendants [self] + children.map{|t| t.decendants }.flatten end |