[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Preferred way to mark a method as deprecated

P. mark Anderson

2/28/2008 12:42:00 AM

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-d...
--
Posted via http://www.ruby-....

1 Answer

Eric Hodel

2/28/2008 12:55:00 AM

0

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-d...

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.