# File lib/mocha/class_method.rb, line 46 46: def restore_original_method 47: if method_exists?(hidden_method) 48: begin 49: stubbee.__metaclass__.class_eval("alias_method :#{method}, :#{hidden_method}; remove_method :#{hidden_method}", __FILE__, __LINE__) 50: rescue NameError 51: # deal with nasties like ActiveRecord::Associations::AssociationProxy 52: end 53: end 54: end