From: Roger Pack Date: 2009-07-16T00:54:45+09:00 Subject: Re: Twelve rules of Ruby > I'd explain these concepts in terms of the basic tools that I, even > after years of rubying, still use to explore the capabilities of an > object: > > irb(main):001:0> s = "foo" > irb(main):003:0> s.methods.grep /slice/ > irb(main):005:0> s.class.ancestors > irb(main):006:0> String.instance_methods(false) > irb(main):007:0> s.method :dup # to find out where the method came from > => # I just learned something--I didn't know you can infer a methods owner even in 1.8. Nice. =r -- Posted via http://www.ruby-forum.com/.