# Preferred way to mark a method as deprecated

**URL:** <https://www.ruby-forum.com/t/preferred-way-to-mark-a-method-as-deprecated/130418>\
**Category:** Ruby\
**Created:** [February 28, 2008, 1:41am UTC](https://www.ruby-forum.com/t/preferred-way-to-mark-a-method-as-deprecated/130418 "2008-02-28T01:41:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![polunochnik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/65b543/32.png) [@polunochnik](https://www.ruby-forum.com/u/polunochnik)\
**Post date:** [February 28, 2008, 1:41am UTC](https://www.ruby-forum.com/t/preferred-way-to-mark-a-method-as-deprecated/130418/1 "2008-02-28T01:41:57Z")

</div>

Does Ruby have built in functionality or a convention for marking a  
method as deprecated? Something like ActiveSupport’s deprecate method  
is what I have in mind, but more general.

[http://ryandaigle.com/articles/2006/07/28/whats-new-in-edge-rails-explicit-deprecation](http://ryandaigle.com/articles/2006/07/28/whats-new-in-edge-rails-explicit-deprecation)

---

<div class="post-metadata">

**Author:** ![polunochnik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/65b543/32.png) [@polunochnik](https://www.ruby-forum.com/u/polunochnik)\
**Post date:** [February 28, 2008, 1:55am UTC](https://www.ruby-forum.com/t/preferred-way-to-mark-a-method-as-deprecated/130418/2 "2008-02-28T01:55:47Z")

</div>

On Feb 27, 2008, at 16:41 PM, P. mark Anderson wrote:

> Does Ruby have built in functionality or a convention for marking a  
> method as deprecated? Something like ActiveSupport’s deprecate method  
> is what I have in mind, but more general.
> 
> [http://ryandaigle.com/articles/2006/07/28/whats-new-in-edge-rails-explicit-deprecation](http://ryandaigle.com/articles/2006/07/28/whats-new-in-edge-rails-explicit-deprecation)

Add ‘warn “blah is deprecated and will be removed”’ as the first line  
of your method.

There’s no need to complicate anything with extra methods you have to  
call.
