>>>>> "S" == Stephen White <steve / deaf.org> writes:

 It's best to write 

S>   a.scan(pattern) {|i|
S>     table[i] ||= []   
S>     table[i] += $~.begin(0)

       table[i] << $~.begin(0)

S>   }
     

Guy Decoux