[ruby-core:119029] [Ruby master Feature#20709] Improve String#rindex performance on OSX