Actions
Feature #9070
openIntroduce `---` as synonym of `end` keyword
Description
=begin
This is just an idea: introduce "(({---}))" as synonym of "(({end}))" keyword.
It is a bit easier to type and to read, and makes whitespace insensitive language look as if it follows off-side rule. Compare:
class Person
attr_reader :name, :age
def initialize(name, age)
@name, @age = name, age
---
def <=>(person) # the comparison operator for sorting
age <=> person.age
---
def to_s
"#{name} (#{age})"
---
class Person
attr_reader :name, :age
def initialize(name, age)
@name, @age = name, age
end
def <=>(person) # the comparison operator for sorting
age <=> person.age
end
def to_s
"#{name} (#{age})"
end
end
=end
Actions
Like0
Like0Like0Like0Like0Like0