Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

Hi,
At Sun, 22 Jul 2007 12:25:01 +0900,
bcparanj@gmail.com wrote in [ruby-talk:261195]:
> Does anyone know if this is already part of Ruby open source library?> I did not find anything on Google. TIA.
String#index uses Karp-Rabin algorithm, not Boyer-Moore.

In message
<cebd6fd10707220221g67c7c969hd7c022fa08cd091e@mail.gmail.com>,
"Nobuyoshi Nakada" wr
ites:
>At Sun, 22 Jul 2007 12:25:01 +0900,>bcparanj@gmail.com wrote in [ruby-talk:261195]:>> Does anyone know if this is already part of Ruby open source library?>> I did not find anything on Google. TIA.>String#index uses Karp-Rabin algorithm, not Boyer-Moore.
That strikes me as secondary; presumably, the goal is to implement it in
Ruby
code, not to determine what algorithm the language internals use, no?
-s

On Jul 22, 2007, at 1:04 PM, Peter Seebach wrote:
>> String#index uses Karp-Rabin algorithm, not Boyer-Moore.>> That strikes me as secondary; presumably, the goal is to implement> it in Ruby> code, not to determine what algorithm the language internals use, no?>> -s>
Perhaps if you look into the code for one of those functions, you
might find that it is done in Ruby, you might not.

In message <8E18FA11-568B-4331-9BC0-2FB4B6BFC687@gmail.com>, John Joyce
writes:
>Perhaps if you look into the code for one of those functions, you>might find that it is done in Ruby, you might not.
True.
Normally, when someone asks for an algorithm implemented in a language,
a library-style implementation will be a poor fit, as most library
implementations are tuned for speed rather than readability -- perhaps
less true in Ruby, I admit.
-s