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: ShellSort.rb
    path of file: ./repos/al-go-rithms/sort/shell_sort/ruby
    
    the code of the file until where you have to start completion: def shellsort(numbers)
  gap = numbers.length / 2
  #sort
  while gap > 0 do
    i = gap
    while i < numbers.length do
      temp = numbers[i]
      j = i
      while j >= gap &&  numbers[j-gap] > temp do

    
def shellsort(numbers)
  gap = numbers.length / 2
  #sort
  while gap > 0 do
    i = gap
    while i < numbers.length do
      temp = numbers[i]
      j = i
      while j >= gap &&  numbers[j-gap] > temp do
        numbers[j] = numbers[j-gap]
        j-=gap
      end
      numbers[j] = temp
      i+=1
    end
    	
    gap = gap / 2
  end
  return numbers
end