Project

General

Profile

Actions

Feature #10489

open

Add inherit method for clearer and multiple inheritance

Added by brauliobo (Bráulio Bhavamitra) about 10 years ago. Updated 8 months ago.

Status:
Assigned
Target version:
-
[ruby-core:66150]

Description

A new and more intuitive syntax:

class B
end
class A
  inherit B
end

Instead of (but keeping this for backwards compatibility):

class B
end
class A < B
end

Besides, this allows multiple inheritance. Also, inherit could be implemented with just extend plus include?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0