Actions
Feature #16018
openAdd a way to deprecate methods
Status:
Open
Assignee:
-
Target version:
-
Description
Since #11398, We have Module#deprecate_constant
available. But I wonder, why we don't have a way to deprecate methods? There is already Gem::Deprecate
1, so may be this could be extracted and made more generic?
This might be useful on several places in Ruby code:
$ find . -name \*.rb -type f -exec grep -r '[^_]warn.*deprecate' {} \; | wc -l
66
Updated by jeremyevans0 (Jeremy Evans) over 5 years ago
- Tracker changed from Bug to Feature
- ruby -v deleted (
ruby 2.6.3p62 (2019-04-16 revision 67580) [i386-linux]) - Backport deleted (
2.5: UNKNOWN, 2.6: UNKNOWN)
Updated by mame (Yusuke Endoh) about 5 years ago
At the developers' meeting, no one was against this feature. It would be great if we can print a warning per a pair of callsite and callee (to suppress duplicated redundant warnings), but the implementation is not trivial (exploiting method call cache)?
Updated by vo.x (Vit Ondruch) almost 5 years ago
- Related to Feature #16345: Don't emit deprecation warnings by default. added
Actions
Like0
Like0Like0Like0