Issue #7019 has been updated by headius (Charles Nutter).


+1 for "private def foo". I have never seen a good justification for why visibility is better as a value on the current frame, nor for why it's better to set a method's visibility after declaration rather than along with the declaration.

The fact that visibility lives on the frame also means implementations that attempt to optimize frames away (like JRuby does and eventually MRI will want to do) have a harder time of it.
----------------------------------------
Feature #7019: allow `private` and `protected` keywords to take blocks
https://bugs.ruby-lang.org/issues/7019#change-29499

Author: alexeymuranov (Alexey Muranov)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


=begin
I like to indent my private methods one level deeper, but this indentation is inconsistent with the syntax:

 class C
   def f
     #
   end
   private
     def g
     #
     end
 end

I think it would be nice if the (({private})) keyword could take a block, then i would write:

 class C
   def f
     #
   end
   private do
     def g
     #
     end
   end 
 end
=end



-- 
http://bugs.ruby-lang.org/