Issue #16018 has been updated by mame (Yusuke Endoh).


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)?

----------------------------------------
Feature #16018: Add a way to deprecate methods
https://bugs.ruby-lang.org/issues/16018#change-81345

* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
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
~~~

[1]: https://github.com/ruby/ruby/blob/master/lib/rubygems/deprecate.rb



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>