lib/introspection/snapshot.rb in introspection-0.0.1 vs lib/introspection/snapshot.rb in introspection-0.0.2
- old
+ new
@@ -1,14 +1,14 @@
require "introspection/receivers"
-require "metaid"
+require "metaclass"
module Introspection
class Snapshot
attr_reader :methods
def initialize(object)
- @methods = object.receivers.map do |receiver|
+ @methods = (object.receivers rescue []).map do |receiver|
[:public, :protected, :private].map do |visibility|
query_method = "#{visibility}_instance_methods"
receiver.send(query_method, false).map do |method|
unbound_method = receiver.instance_method(method)
if unbound_method.owner.equal?(receiver)
\ No newline at end of file