Project

General

Profile

Feature #12241

super end

Added by nobu (Nobuyoshi Nakada) over 1 year ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
joke
Target version:
-
[ruby-core:74763]

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


Related issues

Related to Ruby trunk - Feature #5054: Compress a sequence of endsRejected

History

#1 [ruby-core:74764] Updated by duerst (Martin Dürst) over 1 year 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 :-).

#2 [ruby-core:74771] Updated by shevegen (Robert A. Heiler) over 1 year ago

You almost got me with this one!

Also see the "endddd" suggestion. :)

Edit: Or perhaps "FINAL_END"

#3 [ruby-core:74775] Updated by nobu (Nobuyoshi Nakada) over 1 year 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.

#4 [ruby-core:74776] Updated by nobu (Nobuyoshi Nakada) over 1 year 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

#5 [ruby-core:74781] Updated by usa (Usaku NAKAMURA) over 1 year ago

  • Assignee set to joke

#6 [ruby-core:74783] Updated by windwiny (wind winy) over 1 year ago

NOOOO GOOD!! is ruby want become to perl?

#7 [ruby-core:74785] Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Status changed from Open to Rejected

#8 Updated by nobu (Nobuyoshi Nakada) about 2 months ago

Also available in: Atom PDF