diff options
author | Xavier Noria <fxn@hashref.com> | 2008-12-28 19:48:05 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-28 19:49:28 +0000 |
commit | a2270ef2594b97891994848138614657363f2806 (patch) | |
tree | 29962a36c4eb70272df2665db2b28d5b3ad15b99 /activesupport/lib/active_support/deprecation.rb | |
parent | 1fb275541a58e6a2100261c6117e96e6c014cc6c (diff) | |
download | rails-a2270ef2594b97891994848138614657363f2806.tar.gz rails-a2270ef2594b97891994848138614657363f2806.tar.bz2 rails-a2270ef2594b97891994848138614657363f2806.zip |
Inline code comments for class_eval/module_eval [#1657 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activesupport/lib/active_support/deprecation.rb')
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index 25b26e9c96..d20151661b 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -90,10 +90,15 @@ module ActiveSupport method_names.each do |method_name| alias_method_chain(method_name, :deprecation) do |target, punctuation| class_eval(<<-EOS, __FILE__, __LINE__) - def #{target}_with_deprecation#{punctuation}(*args, &block) - ::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:#{method_name}, #{options[method_name].inspect}), caller) - #{target}_without_deprecation#{punctuation}(*args, &block) - end + def #{target}_with_deprecation#{punctuation}(*args, &block) # def generate_secret_with_deprecation(*args, &block) + ::ActiveSupport::Deprecation.warn( # ::ActiveSupport::Deprecation.warn( + self.class.deprecated_method_warning( # self.class.deprecated_method_warning( + :#{method_name}, # :generate_secret, + #{options[method_name].inspect}), # "You should use ActiveSupport::SecureRandom.hex(64)"), + caller # caller + ) # ) + #{target}_without_deprecation#{punctuation}(*args, &block) # generate_secret_without_deprecation(*args, &block) + end # end EOS end end |