irb(main):004:0> " now's  the time".scan(/ /)
=> [" ", " ", " ", " "]
irb(main):005:0> " now's  the time".split(/ /)
=> ["", "now's", "", "the", "time"]

I expected ["", "now's", "", "the", "", "time"].

How
String#split(http://www.omniref.com/ruby/v2_1_1/classes/String##split)
with regex argument working here actually ?

-- 
Posted via http://www.ruby-forum.com/.