4 ms·
This is one of the few features of Ruby I've never found a use for, and not fit lack of trying. I thought I remembered Matz once saying it would be removed, Bu
by cout 2y ago
This is one of the few features of Ruby I've never found a use for, and not fit lack of trying.
I thought I remembered Matz once saying it would be removed, But I could be wrong. Maybe someone uses it.
- lmz 2y agoIt's from Awk, probably via Perl. https://www.gnu.org/software/gawk/manual/html_node/Ranges.html https://www.gnu.org/software/gawk/manual/html_node/Ranges.ht...
- pizza234 2y agoThe 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.