[BUG] type_register and ruby 1.9

Hi, there seems to be a bug when using type_register with ruby 1.9 :

[email protected]:~/src/ruby-gnome2-all-0.19.3/gtk/sample/misc$ ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
[email protected]:~/src/ruby-gnome2-all-0.19.3/gtk/sample/misc$ ruby
properties.rb
properties.rb:22:in each': can't convert String into Integer (TypeError) from properties.rb:22:ineach_with_index’
from properties.rb:22:in initialize' from properties.rb:22:ininitialize’
from properties.rb:69:in new' from properties.rb:69:in

while it works ok with 1.8 :

[email protected]:~/src/ruby-gnome2-all-0.19.3/gtk/sample/misc$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
[email protected]:~/src/ruby-gnome2-all-0.19.3/gtk/sample/misc$ ruby
properties.rb
#<MyButton:0x7f44d8c32660 ptr=0x1b72820>
“Hello”
GLib::Type[“MyButton”]


[MyButton, MyButton::RubyGtkContainerHook__, Gtk::Button,
#Module:0x7f44dbb9f358, Gtk::Bin, Gtk::Container, Gtk::Widget,
Gtk::Buildable, Atk::Implementor, GLib::Interface, Gtk::Object,
GLib::InitiallyUnowned, GLib::Object, GLib::Instantiatable, Object,
Kernel]

Moreover, the error message does not really points at the right place.
It always report the line which is calling ‘super’.

regards

Simon

Hi,

In [email protected]
“[ruby-gnome2-devel-en] [BUG] type_register and ruby 1.9” on Fri, 9
Oct 2009 17:48:26 +0200,
Simon A. [email protected] wrote:

from properties.rb:22:in initialize' from properties.rb:69:innew’
from properties.rb:69:in `’

Thanks for reporting.
I’ve fixed it in trunk.


kou

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs