From: "Jan E." Date: 2012-07-25T16:01:11+09:00 Subject: Re: Help with exercise from Chris Pine's Ruby Book: Sort without using .sort Your method is of course correct. But you don't really use the recursion, since you basically just replaced the while loop with a method repeatedly calling itself. You might want to reduce the problem to a smaller task first. For example, you could write a method that finds the minimum of an array and returns both the minimum and the rest of the array. You can then use this simple method to recursively build a sorted array: #----------------------- def find_min array min, rest = array.first, [] array.drop(1).each do |element| if element < min rest << min min = element else rest << element end end return min, rest end def min_sort array return array if array.empty? min, rest = find_min array [min] + min_sort(rest) end #----------------------- -- Posted via http://www.ruby-forum.com/.