In Ruby 1.9.3 (and probably earlier versions, not sure), I\'m trying to figure out why Ruby\'s String#split method is giving me certain results. The results I\'m getting se
"abcabc".split("b") #=> ["a", "ca", "c"]
"abcabc".split("a") #=> ["", "bc", "bc"]
"abcabc".split("c") #=> ["ab", "ab"]
Suppose you were splitting on a comma. What behaviour would you expect from
",bc,bc".split(',')? It's not different with splitting on 'a'. For the third example, split omits the trailing empties by default.