merge sort infinite recursion : I'm learning Ruby and algorithms at the current moment an would like some guidance in solving this issue that has arise. I haven't started the merge process yet. So far I've only focused on dividing the array over and over again until only 1 number is left in the array. Below is my code showing how I implemented this so far. My problem is the loop will not break and I'm unsure why. I'm hoping someone can point me in the right direction as to what I'm missing. I'm also open to resources to help me solve this problem better.

    def mergesort(list)
	mid = list.length / 2
	left = list[0, mid]
	right = list[mid, list.size]

	until left.size <= 1 || right.size <= 1 do
		test(mergesort(left), mergesort(right))
	end

	print left
	print right

	def test(left, right)
		sorted = []

		left.length / 2
		right.length / 2

		# print sorted
	end
end