/* * call-seq: * dvector.sort! -> dvector * dvector.sort! {| a,b | block } -> dvector * * Sorts _dvector_ in place. _dvev_ is effectively frozen while a sort is in progress. * Comparisons for the sort will be done using the <code><=></code> operator or using * an optional code block. The block implements a comparison between * <i>a</i> and <i>b</i>, returning -1, 0, or +1. * * a = Dvector[ 4, 1, 2, 5, 3 ] * a.sort! -> Dvector[ 1, 2, 3, 4, 5 ] * a -> Dvector[ 1, 2, 3, 4, 5 ] * a.sort! {|x,y| y <=> x } -> Dvector[ 5, 4, 3, 2, 1 ] * a -> Dvector[ 5, 4, 3, 2, 1 ] */ VALUE dvector_sort_bang(VALUE ary) {