Project

General

Profile

Actions

Feature #6452

open

Allow extend to override class methods

Added by rosenfeld (Rodrigo Rosenfeld Rosas) almost 12 years ago. Updated over 3 years ago.

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

Description

module A
  def self.a
    'a1'
  end
end

module B
  def a
    'a2'
  end

  def b
    'b'
  end
end

A.extend B

assert A.a == 'a2' # this is the change I'm proposing - currently it is 'a1'
assert A.b == 'b'

Would this change be possible for 3.0?


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #1102: Prepend ModuleClosednobu (Nobuyoshi Nakada)02/04/2009Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0