Mike Stephens wrote:
> It raises an interesting question. When you write methods outside of a
> specific class block, you are in the envelope of some top level class,
> so why aren't these methods added?
>   
They are added, they are just private. You have to call them as private 
methods. They are made private because they simulate what functions are 
used for in other languages. You can call them from anywhere but only 
without a receiver. If you want to create methods for classes, that are 
supposed to be called on receivers, it's better to inherit from a class, 
write a module and include it in your class, or even reopen the class 
and add the methods directly. I always thought it was pretty neat how 
consistently Ruby uses its OOP design to implement all the features 
people have come to expect from modern languages.

-- 
Florian Frank