From: Sam Duncan Date: 2012-08-15T11:49:58+09:00 Subject: Re: Idea: def ... end returns the symbolized version of the newly-defined method, instead of nil On 08/15/2012 02:41 PM, Peter wrote: > > Since a symbol is already created when a method is defined, and we are > dealing with a functional language (or one with functional aspects), I > just think it would be useful for a def to return something other than > "nil", and it would nicely dovetail with the fact that "protected" and > "private" can take symbol arguments. There are no extra costs involved. > Seems like a nice idea to me. I have absolutely no idea what negative implications it might have. I have gotten into the habit of doing this (which I'm sure the Ruby community will be horrified by, but I quite like) def foo ... end; private :foo Sam