Instead of doing for...in and use i as an index, you could do
letters.each...do...|letter| and there's no index. letter is the
extracted index.

The only problem would be the ordinals[i] which could stay as it is
and note your own iterations (not recommended) or do, instead of
letters.each, do letters.each_index do |i| and little would change.

Both suggestions would rid you of needing the length argument, but to
be honest that's the only real disadvantage to your algorithm. It's
pretty much fine how it is. You should only change it if it's really
hard to find length in my opinion.