vendor/gems/flexmock-0.8.5/lib/flexmock/partial_mock.rb
def create_alias_for_existing_method(method_name)
      begin
        new_alias = new_name(method_name)
        unless @obj.respond_to?(new_alias)
          sclass.class_eval do
            alias_method(new_alias, method_name)
          end
        end
        new_alias
      rescue NameError => ex
        # Alias attempt failed
        nil
      end
    end
# Create an alias for the existing +method_name+.  Returns the new
# alias name.  If the aliasing process fails (because the method
# doesn't really exist, then return nil.
Create an alias for the existing +method_name+.  Returns the new
alias name.  If the aliasing process fails (because the method
doesn't really exist, then return nil.
Create an alias for the existing + method_name + . Returns the new alias name . If the aliasing process fails ( because the method doesn ' t really exist then return nil .
def create_alias_for_existing_method(method_name)
      begin
        new_alias = new_name(method_name)
        unless @obj.respond_to?(new_alias)
          sclass.class_eval do
            alias_method(new_alias, method_name)
          end
        end
        new_alias
      rescue NameError => ex
        nil
      end
    end
def create_alias_for_existing_method ( method_name ) begin new_alias = new_name ( method_name ) unless @obj . respond_to? ( new_alias ) sclass . class_eval do alias_method ( new_alias , method_name ) end end new_alias rescue NameError => ex nil end end
Create an alias for the existing +method_name+.
Create an alias for the existing + method_name + .
# Alias attempt failed
method_name