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