diff options
author | Michael S. Klishin <michael@novemberain.com> | 2008-12-28 13:21:10 +0300 |
---|---|---|
committer | Michael S. Klishin <michael@novemberain.com> | 2008-12-28 13:21:10 +0300 |
commit | d77deb89d54b18c662ae3de103802e4d7a9d7d08 (patch) | |
tree | f5a77220f9057d3b998e1a2db8166ecc021e32cc /activesupport/lib/active_support/deprecation.rb | |
parent | 5da3ba12159d2c4fc0680efcf0cad8a31f725122 (diff) | |
download | rails-d77deb89d54b18c662ae3de103802e4d7a9d7d08.tar.gz rails-d77deb89d54b18c662ae3de103802e4d7a9d7d08.tar.bz2 rails-d77deb89d54b18c662ae3de103802e4d7a9d7d08.zip |
Annotated metaprogramming code across ActiveSupport
Diffstat (limited to 'activesupport/lib/active_support/deprecation.rb')
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index 25b26e9c96..d9bd40199f 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -89,11 +89,13 @@ module ActiveSupport method_names = method_names + options.keys 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 + class_eval(<<-EOS, __FILE__, __LINE__ + 1) + def #{target}_with_deprecation#{punctuation}(*args, &block) # def multi_with_reprecation(*args, &block) + ::ActiveSupport::Deprecation.warn( # ::ActiveSupport::Deprecation.warn( + self.class.deprecated_method_warning(:#{method_name}, #{options[method_name].inspect}), # self.class.deprecated_method_warning(:multi, "this method is deprecated, blah, blah, blah") + caller) # caller) + #{target}_without_deprecation#{punctuation}(*args, &block) # multi_without_deprecation(*args, &block) + end # end EOS end end |