From: Gavin Kistner Date: 2006-10-28T02:57:17+09:00 Subject: Re: classless methods From: jwmerrill@gmail.com [mailto:jwmerrill@gmail.com] On > And since Object is an ancestor of pretty much everything in ruby, > it's interesting to note that these methods are now defined for > practically everything in ruby: [snip] You're being fooled by some tricks that irb plays to make itself work. In non-irb, these methods are private methods of Object, and not immediately callable: def say_hello; "Hello"; end [1,2,3].say_hello #=> tmp.rb:2: private method `say_hello' called for [1, 2, 3]:Array (NoMethodError)