Sometimes old constants are deprecated but still remained for backward compatibilities.
It is not noticed and will be kept forever, with no warnings, though.
So I propose a method
Module#deprecate_constant to mark a constant obsolete and emit a warning message when it is referred.
Updated by nobu (Nobuyoshi Nakada) almost 5 years ago
- Status changed from Open to Closed
Applied in changeset r51444.
- variable.c (rb_const_get_0): warn deprecated constant reference.
- variable.c (rb_mod_deprecate_constant): mark constants to be warned as deprecated. [Feature #11398]