I noticed a huge difference in memory use on whether I run the code
with ruby 1.8 or 1.9.

With ruby 1.8, the suffix-array-based/-like solutions require about
120mb for the Iliad. With 1.9 ... I get an "failed to allocate memory
(NoMemoryError)" error too (virtual memory being  disabled, 1GB).

Thomas.