From: Devin Mullins Date: 2005-06-11T11:26:10+09:00 Subject: Re: blocks, scope/context confusion Yukihiro Matsumoto wrote: >Because "return 99" at the toplevel causes an exception as well. > > Ah! Thanks (I was curious, too). That makes sense. >Try > > def foo > meth1 { return 99 } > end > p foo > > > Or, more to the point, try: def foo meth1 { return 99 } return 47 end p foo Corey: Here's an article on closures (which are, as I understand it, what blocks are) that might help some: http://www.sidhe.org/~dan/blog/archives/000152.html Devin