From: Austin Ziegler Date: 2008-11-27T03:56:12+09:00 Subject: [ruby-core:20128] Re: [Bug #797] bug or feature: local method ? On Wed, Nov 26, 2008 at 1:32 PM, Francoys wrote: > As who see, i am facing a real life situation where nested methods > seem very useful and the more elegant solution. Nested methods in Ruby don't work like they do in Pascal; they appear in the main object scope: class Foo def bar def baz puts "baz" end puts "bar" end end foo = Foo.new foo.baz #=> exception foo.bar #=> "bar" foo.baz #=> "baz" I'm not sure if that matters for your use case. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca