Project

General

Profile

Feature #5065

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

=begin 

 I've noticed issue #5054, subjecting an "endall". 

 ```ruby 
 module MyModule 
   class MyClass 
     def my_method 
       10.times do 
         if rand < 0.5 
            
           p :small 
         endall 
 ``` 

 


 To reduce typing, but to keep the levels, the following construct could be allowed: 

 ```ruby 
 module MyModule 
   class MyClass 
     def my_method 
       10.times {     # "10.times do" would work, too 
         if rand < 0.5 
            
           p :small 
         } 
       } 
      
     } 
   } 
  
 } 
 ``` 
 

 The speciality of this language would be, that an opening brace is not necessary 

 Several constructs allow already the use of "{}" (do / end), thus this would be possibly the consistent way to reduce typing effort, but to keep the structure intact. 

 =end 

Back