>>>>> "D" == Dave Thomas <Dave / PragmaticProgrammer.com> writes:

D> I'm not sure, except that 'include' is familiar syntax for users of
D> the module. Are there benefits to using extend?

 Well, when I've seen it I've said "but it's #extend !!!" and I was
 surprised by this use of #include :-)))

 with extend it's just


   module Resource
      def use(*params, &blk)
         obj = new(*params, &blk)
         begin
            return yield(obj)
         ensure
            obj.close if obj.respond_to?(:close)
         end
      end
   end
   


Guy Decoux