Devin Mullins wrote:
> Daniel Berger wrote:
>> What do people think of the idea of private (and protected) taking a
>> block?
>>
>> This wouldn't really be any different than the current behavior for
>> methods, but it would (in theory) allow you to make constants, class
>> variables and class instance variables private.
> Hrm... I have no opinion on private constants, but I'm going to borrow 
> this thread to ask a related question. (Feel free to yell at me.)
> 
> What do people think of 'def' returning the name of the method? Then you 
> could do:
>   private def foo
>     blahblahblah
>   end
> For those one-off private methods.
> 
> Devin
> *turns on noise-cancelling headphones*
> 
> 

This has been proposed before (i.e. have 'def' return a symbol).  I 
don't know if Matz implemented this for 1.9 or not.  It won't make it 
into 1.8, though.

http://oldrcrs.rubypal.com/rcr/show/277

Regards,

Dan