It was the identical 'MyClass' 'MyClass' that threw me, maybe make a psuedo
instance inspect string?

On Tuesday, 30 July 2013, Bradley Schaefer wrote:

> In lib/rspec/mocks/instance_method_stasher.rb:
>
> > @@ -36,6 +36,12 @@ def method_defined_on_klass?(klass = @klass)
> >
> >        def method_owned_by_klass?
> >          owner = @klass.instance_method(@method).owner
> > +
> > +        # On Ruby 2.0.0+ the owner of a method on a class which has been
> > +        # `prepend`ed may be an uninitialized instance of `MyClass` rather
> > +        # than `MyClass` itself.
> > +        owner = owner.class unless owner.respond_to? :method_defined?
>
> I struggled with trying to explain that line :) I think checking that it is_a?
> Class is a good idea, though. Thanks!
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/rspec/rspec-mocks/pull/385/files#r5474814>
> .
>