removed ObjectSpace usage

This commit is contained in:
Matt Aimonetti 2009-05-28 10:36:25 -07:00
parent 295c0f0511
commit 5e0632c1d0

View file

@ -15,7 +15,8 @@ module CouchRest
include CouchRest::Mixins::ClassProxy include CouchRest::Mixins::ClassProxy
def self.subclasses def self.subclasses
ObjectSpace.enum_for(:each_object, class << self; self; end).to_a.delete_if{|k| k == self} @subclasses ||= []
# ObjectSpace.enum_for(:each_object, class << self; self; end).to_a.delete_if{|k| k == self}
end end
def self.inherited(subklass) def self.inherited(subklass)
@ -25,6 +26,7 @@ module CouchRest
subklass.properties = self.properties.dup subklass.properties = self.properties.dup
end end
EOS EOS
subclasses << subklass
end end
# Accessors # Accessors