lib/mass.rb in ruby-mass-0.1.2 vs lib/mass.rb in ruby-mass-0.1.3

- old
+ new

@@ -31,10 +31,10 @@ # Returns a hash containing classes with the object_ids of its instances currently in the Ruby Heap. You can narrow the result by namespace. # def index(*mods) instances_within(*mods).inject({}) do |hash, object| - ((hash[object.class.name] ||= []) << object.object_id).sort! if object.respond_to?(:class) + ((hash[object.class.name] ||= []) << object.object_id).sort! if object.methods.collect(&:to_s).include?("class") hash end end # Returns a hash containing classes with the amount of its instances currently in the Ruby Heap. You can narrow the result by namespace. \ No newline at end of file