This project is archived and is in readonly mode.

#2431 ✓resolved
Michael Siebert

deprecate fails on methods ending with equal sign

Reported by Michael Siebert | April 6th, 2009 @ 07:03 PM | in 2.x

it is not possible to deprecate methods that end with "=" using ActiveSupport::Deprecation.

class Foo
 attr_accessor bar
 deprecate :bar=

this throws the following error:

active_support/deprecation.rb:100:in `deprecate': compile error (SyntaxError)
activesupport/lib/active_support/deprecation.rb:99: syntax error, unexpected ',', expecting '='

this is because*bar) is not valid ruby syntax. The fix is to use send instead.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by