#!/usr/bin/ruby

#
## http://rosettacode.org/wiki/Sort_an_integer_array
#

var nums = [2,4,3,1,2];
var sorted = nums.sort;  # returns a new sorted array.
nums.sort!;              # sort 'nums' "in-place"

say sorted;
