New Methods in Ruby 2.2

You’ll find the slice_* methods used often when parsing text files, such as device configurations, where there are blocks of commands or settings that need to be grouped.

I’ve written several such device parsers, and slice_before made it almost trivial.