# File lib/mocha/any_instance_method.rb, line 35 35: def restore_original_method 36: if method_exists?(hidden_method) 37: begin 38: stubbee.send(:alias_method, method, hidden_method) 39: stubbee.send(:remove_method, hidden_method) 40: rescue NameError 41: # deal with nasties like ActiveRecord::Associations::AssociationProxy 42: end 43: end 44: end