lib/glue/object.rb in nitro-0.9.5 vs lib/glue/object.rb in nitro-0.10.0

- old
+ new

@@ -1,7 +1,11 @@ -# $Id$ +# * George Moschovitis <gm@navel.gr> +# (c) 2004-2005 Navel, all rights reserved. +# $Id: object.rb 259 2005-02-15 08:54:54Z gmosx $ +# Code from RubyOnRails (http://www.rubyonrails.com) + class Object #:nodoc: def remove_subclasses_of(superclass) subclasses_of(superclass).each { |subclass| Object.send(:remove_const, subclass) rescue nil } end @@ -12,9 +16,11 @@ subclasses << k.to_s end subclasses end end + +# Code from RubyOnRails (http://www.rubyonrails.com) class Class #:nodoc: def remove_subclasses Object.remove_subclasses_of(self) end