Surely rux would cover more edge cases than your function? A lot of people would see this function and struggle to understand what it is doing, but if you explicitly use something like rux it's much more obvious. I guess rux would have more overhead than this though.
You could easily write a method to do this:
Not the prettiest, but it doesn't require additional gems or a new syntax highlighter and linter.