From: matt@... (matt neuburg) Date: 2006-10-28T03:10:11+09:00 Subject: Re: classless methods Jason Merrill wrote: > 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: > > irb(main):001:0> def say_hello > irb(main):002:1> "Hello" > irb(main):003:1> end > => nil > irb(main):004:0> say_hello > => "Hello" > irb(main):005:0> [1,3,5].say_hello > => "Hello" But that's just a vagary of how irb works. You couldn't do that in a real script. m. -- matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/ Tiger - http://www.takecontrolbooks.com/tiger-customizing.html AppleScript - http://www.amazon.com/gp/product/0596102119 Read TidBITS! It's free and smart. http://www.tidbits.com