Hi, Bill,

Bill Kelly wrote:
> 
> Also, with the 'tokenizer' version the following
> 
> >     for idx in 0..list1.size do
> >         token1 = list1[idx]
> >         token2 = list2[idx]
> >
> >         if token1 == nil then
> >             return token2 == nil
> >         end
> >
> >         if token2 == nil then
> >             return token1 == nil
> >         end
> 
> could be
> 
>     for idx in 0...list1.size do
>         token1 = list1[idx]
>         token2 = list2[idx]
>         return false if token2 == nil
> 
> Bill

I'm just a wet-behind-the-ears Ruby newbie, but isn't this

> >         if token1 == nil then
> >             return token2 == nil
> >         end
> >
> >         if token2 == nil then
> >             return token1 == nil
> >         end

equivalent to

            return true if token1 == nil && token2 == nil

(which, incidentally, means that the second of the original
phrases:

> >         if token2 == nil then
> >             return token1 == nil
> >         end

would never be executed, since the first one is equivalent)?

Just trying to further my Ruby education...

-jn-

-- 
joelDOTneelyATfedexDOTcom