From: "alexeymuranov (Alexey Muranov)" Date: 2012-08-15T02:07:00+09:00 Subject: [ruby-core:47190] [ruby-trunk - Feature #6868] Make `do` in block syntax optional when the block is the last argument of a method and is not an optional argument Issue #6868 has been updated by alexeymuranov (Alexey Muranov). I have just realized that parameters are parsed before looking up the method definition, so maybe this is not possible... I was just thinking if it is possible to unify somehow all Ruby objects and classes. (No matter how hard `Class` pretends to be a simple object, it is clear that it is not only not a simple object, but not even a simple class, it cannot be subclassed for example.) ---------------------------------------- Feature #6868: Make `do` in block syntax optional when the block is the last argument of a method and is not an optional argument https://bugs.ruby-lang.org/issues/6868#change-28869 Author: alexeymuranov (Alexey Muranov) Status: Open Priority: Low Assignee: Category: core Target version: 3.0 =begin I propose to make the use of "(({do}))" in block syntax optional if the block is the last argument of a method and if it is a required argument, at least if the block does not take parameters. (I think this would be in line with how for example the last hash argument is treated.) I also think that this syntactic change may allow in future versions of Ruby to make (({def})), (({class})), (({module})) methods instead of keywords. Something like: 3.time puts "Hi!" end instead of 3.time do puts "Hi!" end I know this is not a good example, because for (({#times})) the block argument is optional. =end -- http://bugs.ruby-lang.org/