> The top three candidates that I've found for how to do this
> efficiently are:
> def common1(w1, w2)  # my favorite, aesthetically :-)
>    (0...w1.size).find_all { |i| w1[i] == w2[i] } .size
> end
[...]

Pointless comment #42:

if this were in the APL language, it would be:

+/w1=w2

Alas, this is about the only nice thing you can do with APL :-)

matju