Selon Alexander Fleck <Fleck / schleissheimer.de>:

> Hi,
> is the Ruby-'include' equal to a C++-'using' statement? Meant for namespace
> issues. Or does it have a bigger result?
> Thanks,
> Alex.
>

"include" is used to mix in a module into a class. It has nothing to do with
namespaces, but is rather a way to quickly add functionality to a class beyond
what is given by its superclass without resorting to multiple inheritance.
Mixins are in a way similar to Java interfaces, except that they contain
fully-fledged methods, rather than just method signatures.

Note that Ruby 1.9 (the development version) now has the "using" keyword for
namespaces too (check out:
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/6a732d353724f801/de6275a6a51b6bcd#de6275a6a51b6bcd).
But since Ruby 1.9 is highly experimental, it might change before it becomes the
stable Ruby2.
--
Christophe Grandsire.

http://rainbow.conlang.free.fr

It takes a straight mind to create a twisted conlang.