Project

General

Profile

Actions

Feature #16018

open

Add a way to deprecate methods

Added by vo.x (Vit Ondruch) over 4 years ago. Updated over 4 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:93902]

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

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #16345: Don't emit deprecation warnings by default.ClosedActions
Actions #1

Updated by jeremyevans0 (Jeremy Evans) over 4 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) over 4 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)?

Actions #3

Updated by vo.x (Vit Ondruch) over 4 years ago

  • Related to Feature #16345: Don't emit deprecation warnings by default. added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0