# File glib/tests/test-glib2.rb, line 69 def test_inheritance_and_gc begin require 'gtk2' mybutton = Class.new(Gtk::Button) box = Gtk::HBox.new 10.times{ box.add mybutton.new } GC.start assert(box.children.all?{|item| item.is_a? mybutton }) rescue LoadError end end