It's from Awk, probably via Perl. https://www.gnu.org/software/gawk/manual/html_node/Ranges.ht...
Re:How it became like this? Ruby Range class
by pizza234 on Tuesday July 30, 2024 @02:33AM
(#41106559)
The flip-flop operator is very useful to extract continuous subsets, typically, sections of (multi-line) strings, where the dev defines the delimiters - think of the `=begin` and `=end` keywords.
I've personally never used for anything else than strings, but when I do, it's very useful.
I thought I remembered Matz once saying it would be removed, But I could be wrong. Maybe someone uses it.