From: "alexeymuranov (Alexey Muranov)" Date: 2013-02-20T00:07:53+09:00 Subject: [ruby-core:52531] [ruby-trunk - Feature #7882] Allow rescue/else/ensure in do..end Issue #7882 has been updated by alexeymuranov (Alexey Muranov). I've heard of a convention to use `{ ... }` for blocks evaluated for a result and `do ... end` for blocks evaluated for side effects: http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc From this point of view, there probably shouldn't be any differences in the syntax inside the two forms of blocks. ---------------------------------------- Feature #7882: Allow rescue/else/ensure in do..end https://bugs.ruby-lang.org/issues/7882#change-36621 Author: charliesome (Charlie Somerville) Status: Assigned Priority: Normal Assignee: matz (Yukihiro Matsumoto) Category: Target version: 2.1.0 =begin The keywords (({rescue})), (({else})) and (({ensure})) can be used when defining methods like so: def foo # rescue # else # ensure # end However when using a block delimited by do..end, you must use (({begin}))..(({end})) as well: foo do begin # ... rescue # ... # ... end end It would be nice to be able to drop the extra (({begin}))..(({end})) and use (({rescue})), etc. clauses directly: foo do # ... rescue # ... # ... end I cannot think of any ambiguities this syntax would cause, but please correct me if I am wrong. =end -- http://bugs.ruby-lang.org/