aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/deprecation.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-07-24 16:48:57 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-07-24 16:48:57 +0000
commitedd68a587f412ccdf15613c663acbab341d45017 (patch)
tree386437d0bb09c7944943b0590a5f80c60146e853 /activesupport/lib/active_support/deprecation.rb
parent34b081112536e382845e8dee146d884b4af20c4a (diff)
downloadrails-edd68a587f412ccdf15613c663acbab341d45017.tar.gz
rails-edd68a587f412ccdf15613c663acbab341d45017.tar.bz2
rails-edd68a587f412ccdf15613c663acbab341d45017.zip
Refactored in use of extract_options! (closes #9079) [josh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/deprecation.rb')
-rw-r--r--activesupport/lib/active_support/deprecation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index 8499ad6e2d..2baa667c03 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -85,7 +85,7 @@ module ActiveSupport
module ClassMethods #:nodoc:
# Declare that a method has been deprecated.
def deprecate(*method_names)
- options = method_names.last.is_a?(Hash) ? method_names.pop : {}
+ options = method_names.extract_options!
method_names = method_names + options.keys
method_names.each do |method_name|
alias_method_chain(method_name, :deprecation) do |target, punctuation|