From: Austin Ziegler Date: 2004-12-02T23:57:09+09:00 Subject: Re: nested defs, what if... On Thu, 2 Dec 2004 23:44:08 +0900, Hugh Sasse Staff Elec Eng wrote: > This is too half-baked to be an RCR, but here goes... > > At the moment we cannot write > > class Thingy > def somefunc > def newfunc > ... > end > end > end irb(main):001:0> class Thingy irb(main):002:1> def somefunc irb(main):003:2> def newfunc irb(main):004:3> end irb(main):005:2> end irb(main):006:1> end irb(main):007:0> Thingy.instance_methods.grep(/func/) => ["somefunc"] irb(main):009:0> Thingy.new.somefunc => nil irb(main):010:0> Thingy.instance_methods.grep(/func/) => ["newfunc", "somefunc"] -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca