fork download
  1. #!ruby -n
  2. p eval "[#{$_[2..-1].gsub(/(\d+)-/,'*\1..')}]"
Success #stdin #stdout 0s 5924KB
stdin
>>1
>>1-3
>>1,3
>>1-3,5,9-10
stdout
[1]
[1, 2, 3]
[1, 3]
[1, 2, 3, 5, 9, 10]