On Sunday 10 September 2006 15:04, Robert Dober wrote:
> class Array
> def pattern( *args )
> l = args.length
> c = dup
> while c.first(l) != c do 
> c.shift
> return nil if c.length < l
> end
> length - c.length
> end
> end

'while c.first(l) != c do' should of course be:
while c.first(l) != args do

Alex