# File lib/pry/default_commands/editing.rb, line 212
        def process_patch
          lines = @method.source.lines.to_a

          lines[0] = definition_line_for_owner(lines[0])

          temp_file do |f|
            f.puts lines.join
            f.flush
            f.close(false)
            invoke_editor(f.path, 0, true)

            if @method.alias?
              with_method_transaction(original_name, @method.owner) do
                Pry.new(:input => StringIO.new(File.read(f.path))).rep(@method.owner)
                Pry.binding_for(@method.owner).eval("alias #{@method.name} #{original_name}")
              end
            else
              Pry.new(:input => StringIO.new(File.read(f.path))).rep(@method.owner)
            end
          end
        end