Feature #12241
closedsuper end
Description
This is a refinement of [Feature #5054].
It required to count the depth of count to end, and tiresome.
This proposal will introduce "super end", !end, which ends the block began at the same column with !.
module MyModule
class MyClass
def my_method
10.times do
if rand < 0.5
p :small
!end
https://github.com/ruby/ruby/compare/trunk...nobu:feature/!end
Updated by duerst (Martin Dürst) over 9 years ago
Nobuyoshi Nakada wrote:
This proposal will introduce "super end",
!end, which ends the block began at the same column with!.
I think this should be end!, to look like a Ruby method name :-).
Updated by shevegen (Robert A. Heiler) over 9 years ago
You almost got me with this one!
Also see the "endddd" suggestion. :)
Edit: Or perhaps "FINAL_END"
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
Martin Dürst wrote:
I think this should be end!, to look like a Ruby method name :-).
Since it conflicts with the existing syntax, and ruby-mode.el considers it an ordinary method call, autoindent doesn't work.
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
Robert A. Heiler wrote:
Edit: Or perhaps "FINAL_END"
It isn't always "FINAL".
module MyModule
class MyClass
def my_method
10.times do
if rand < 0.5
p :small
!end
def another_method
while foo do
my_method
!end
!end
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Assignee set to 10790
Updated by windwiny (wind winy) over 9 years ago
NOOOO GOOD!! is ruby want become to perl?
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
- Status changed from Open to Rejected
Updated by nobu (Nobuyoshi Nakada) about 8 years ago
- Related to Feature #5054: Compress a sequence of ends added
Updated by shyouhei (Shyouhei Urabe) over 5 years ago
- Related to Feature #16746: Endless method definition added
Updated by duerst (Martin Dürst) over 4 years ago
- Has duplicate Feature #17786: Proposal: new "ends" keyword added