Interestingly, this revealed that `(0..text.length).last` returns `text.length`, not `text.length - 1` like you might expect. Switching over to use `min/max` instead of `first/last` on account of that, since I think the change is much clearer than taking a `nil` default and then `||=` it immediately.