Project

General

Profile

Actions

Feature #10342

closed

Module#deprecate_constant

Feature #10342: Module#deprecate_constant

Added by nobu (Nobuyoshi Nakada) about 11 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
-
[ruby-core:65521]

Description

Proposal for Module#deprecate_constant, which marks constants referred by arguments as deprecated.

class C
  FOO = 1
  deprecate_constant :FOO
end
C::FOO #=> warning: constant C::FOO is deprecated

https://github.com/nobu/ruby/compare/Module%23deprecate_constant


Related issues 2 (0 open2 closed)

Related to Ruby - Misc #10339: normalize reference to Timeout::ErrorClosedActions
Has duplicate Ruby - Feature #11398: deprecate constantsClosedActions

Updated by nobu (Nobuyoshi Nakada) about 11 years ago Actions #1 [ruby-core:65522]

  • Related to Misc #10339: normalize reference to Timeout::Error added

Updated by marcandre (Marc-Andre Lafortune) about 11 years ago Actions #2 [ruby-core:65530]

The same effect can already be achieved using autoload, right?

Updated by nobu (Nobuyoshi Nakada) about 11 years ago Actions #3 [ruby-core:65603]

Yes, autoload can do the trick, but it needs a separated file and warns only once.

Updated by nobu (Nobuyoshi Nakada) over 9 years ago Actions #4 [ruby-core:75252]

  • Status changed from Open to Closed

Updated by nobu (Nobuyoshi Nakada) over 9 years ago Actions #5

Actions

Also available in: PDF Atom