1 of 6
Doorknob
  • 71.5k
  • 20
  • 142
  • 383

Ruby, 108 chars

s=gets.chop.split ?,
999.times{(0..(s.size-2)).map{|i|s[i],s[i+1]=s[i+1],s[i]if (s[i]<=>s[i+1])>0}}
$><<s*?,

It's a simple bubble sort implementation. It does 999 iterations, which should be enough to sort any reasonably sized array. The maximum iterations (worst-case) is list.length - 1, so this works for lists of up to 1000 elements which should be enough.

Doorknob
  • 71.5k
  • 20
  • 142
  • 383