Cycle_sort is a project mainly written in Ruby, it's free.
A Ruby implementation of the CycleSort sort algorithm
A Ruby implementation of the CycleSort sorting algorithm, from:
http://en.wikipedia.org/wiki/Cycle_sort