From: KATO K. <kz...@us...> - 2005-02-25 15:19:29
|
Update of /cvsroot/ruby-gnome2/ruby-gnome2/glib/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6783/src Modified Files: rbgobj_type.c Log Message: * src/rbgobj_type.c (rbgobj_lookup_class): Fixed a problem in Ruby 1.9. [ruby-list:40518] [ruby-dev:23690] Index: rbgobj_type.c =================================================================== RCS file: /cvsroot/ruby-gnome2/ruby-gnome2/glib/src/rbgobj_type.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- rbgobj_type.c 29 Jan 2005 11:41:17 -0000 1.51 +++ rbgobj_type.c 25 Feb 2005 15:19:19 -0000 1.52 @@ -51,8 +51,15 @@ return cinfo; } - if (TYPE(klass) == T_CLASS) - return rbgobj_lookup_class(rb_funcall(klass, id_superclass, 0)); + if (TYPE(klass) == T_CLASS) { + VALUE super; + if (FL_TEST(klass, FL_SINGLETON)) { + super = RCLASS(klass)->super; + } else { + super = rb_funcall(klass, id_superclass, 0); + } + return rbgobj_lookup_class(super); + } rb_raise(rb_eRuntimeError, "can't get gobject class infomation"); } |