class Array
def self.parse(string)
def self.parse(string) # Using reverse + lookahead to work around Ruby 1.8's lack of lookbehind # TODO: simplify now that we don't support Ruby 1.8 string.reverse.split(/\s(?!\\)/).reverse.map { |s| s.reverse.gsub('\\ ', ' ') } end