From 74f60c032e92b2473b5feeeb85782836c2b83fdd Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 12 Sep 2006 07:10:43 +0000 Subject: alias_method_chain works with accessor= methods also. Closes #6153. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/module/aliasing.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/core_ext/module/aliasing.rb b/activesupport/lib/active_support/core_ext/module/aliasing.rb index a4c7e539e3..19a9297aa4 100644 --- a/activesupport/lib/active_support/core_ext/module/aliasing.rb +++ b/activesupport/lib/active_support/core_ext/module/aliasing.rb @@ -23,7 +23,7 @@ class Module def alias_method_chain(target, feature) # Strip out punctuation on predicates or bang methods since # e.g. target?_without_feature is not a valid method name. - aliased_target, punctuation = target.to_s.sub(/([?!])$/, ''), $1 + aliased_target, punctuation = target.to_s.sub(/([?!=])$/, ''), $1 alias_method "#{aliased_target}_without_#{feature}#{punctuation}", target alias_method target, "#{aliased_target}_with_#{feature}#{punctuation}" end -- cgit v1.2.3