From: Jason Creighton Date: 2003-07-18T23:04:27+09:00 Subject: Re: What's the point? On Thu, 17 Jul 2003 17:26:14 GMT "Sean O'Dell" wrote: > They're known as "local functions" I think (not sure if that is a universal > term for them). I use these from time to time in Pascal. I have several > uses for them: I'm confused: Are they supposed to be local? (Ruby-1.8.0-pre3) ~$ irb >> def fred() >> puts "Fred here!" >> def bob() >> puts "Bob here!" >> end >> bob() >> end => nil >> bob() NoMethodError: undefined method `bob' for main:Object from (irb):8 >> fred() Fred here! Bob here! => nil >> bob() Bob here! => nil >> It looks like it's just an unexpected (for me) side-effect of method definitions being done at runtime. Jason Creighton