Bear in mind that one example can have N proxies (for N (doubles + partial mocks)), so putting the logic here will cause it to be reset N times at the end of an example, which seems needlessly wasteful.

I've got an idea for an alternative solution:

* Subclass `RSpec::Mocks::Proxy` with a class named `RSpec::Mocks::ProxyForNil`.
* Add a `warn_about_message_expectation` method to `RSpec::Mocks::Proxy` that is a no-op. On the `ProxyForNil` subclass, override it to print a warning unless an attribute has been changed on the proxy to silence it.  This will allow you to change the `MethodDouble#warn_if_nil_class` logic to just use a simple `warn_about_message_expectation` method send rather than having any conditionals.
* Change `RSpec::Mocks::Space#proxy_for` so that it instantiates a `RSpec::Mocks::ProxyForNil` when the object is `nil`.  (Really, you can probably just convert the conditional in there to a case statement based on class).
* Change the class methods of `RSpec::Mocks::Proxy` that are involved in this so that they are effectively stateless, opting to delegate to `RSpec::Mocks.proxy_for(nil)` instead.

Once you've done this, there's no need to explicitly reset anything; the proxies are reset between each example already, so the state will get reset automatically w/o any extra effort to do so.  And really, this state feels like it belongs on the proxy for nil, doesn't it?  This also has the nice side benefit of opting for polymorphism over extra conditionals, which is a nice win, I think :).