This is the default behavior of String#split:
input = <<-TEXT
aa bbb
cc dd ee
TEXT
input.split
Result:
["aa", "bbb", "cc", "dd", "ee"]
This works in all versions of Ruby that I tested, including 1.8.7, 1.9.3, 2.0.0, and 2.1.2.
This is the default behavior of String#split:
input = <<-TEXT
aa bbb
cc dd ee
TEXT
input.split
Result:
["aa", "bbb", "cc", "dd", "ee"]
This works in all versions of Ruby that I tested, including 1.8.7, 1.9.3, 2.0.0, and 2.1.2.