# File lib/mocha/class_method.rb, line 29 29: def hide_original_method 30: if method_exists?(method) 31: begin 32: stubbee.__metaclass__.send(:alias_method, hidden_method, method) 33: rescue NameError 34: # deal with nasties like ActiveRecord::Associations::AssociationProxy 35: end 36: end 37: end