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