On Nov 5, 2006, at 8:30 AM, Jeremy McAnally wrote:

> I don't know about Ruby, but many times this is used in Python libs to
> run example code if it's being run by itself and just be a library if
> it's included.  Pretty neat way of keeping the file clutter to a
> minimum.

This is a good point in that this in not Ruby specific.  I've seen  
this idiom in many languages for years now.

I like it and often use it to put a basic command-line interface over  
my libraries.

James Edward Gray II