You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: merger.rb
    path of file: ./repos/ruby_jard/spec/examples/jard_merge_sort/lib/jard_merge_sort
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module JardMergeSort
  class Merger
    def merge(left, right, 
    
    def merge(left, right, less)
      result = []

      while !left.empty? || !right.empty?
        result <<
          if left.empty?
            right.shift
          elsif right.empty?
            left.shift
          elsif less.call(left[0], right[0])
            left.shift
          else
            right.shift
          end