"Dave Thomas" wrote
....

> Well, the problem goes away when I comment out the following three
> lines of code:
>
>    def nil.empty?
>       true
>    end

Have you tried using

 class NilClass
    def empty?
        true
    end
end

instead?

/Christoph