aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-11-27 15:06:08 -0500
committerGitHub <noreply@github.com>2017-11-27 15:06:08 -0500
commitc22ec9710c2aaca75e977db033a613a79b2a5027 (patch)
tree1ce44a407c55055ab9db0c93db488f8cba665b9b /activesupport/lib
parent052620e00347a51926bdebd8afa529e3399176cc (diff)
parent7d35a59e221622a0c5257dc5d176a0ef8d32489e (diff)
downloadrails-c22ec9710c2aaca75e977db033a613a79b2a5027.tar.gz
rails-c22ec9710c2aaca75e977db033a613a79b2a5027.tar.bz2
rails-c22ec9710c2aaca75e977db033a613a79b2a5027.zip
Merge pull request #31243 from ignat-z/patch-1
[ci skip] Fix documentation for deprecation method_wrappers
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/deprecation/method_wrappers.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/deprecation/method_wrappers.rb b/activesupport/lib/active_support/deprecation/method_wrappers.rb
index d359992bf5..c4b78102eb 100644
--- a/activesupport/lib/active_support/deprecation/method_wrappers.rb
+++ b/activesupport/lib/active_support/deprecation/method_wrappers.rb
@@ -8,9 +8,7 @@ module ActiveSupport
module MethodWrapper
# Declare that a method has been deprecated.
#
- # module Fred
- # extend self
- #
+ # class Fred
# def aaa; end
# def bbb; end
# def ccc; end
@@ -22,15 +20,15 @@ module ActiveSupport
# ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead')
# # => Fred
#
- # Fred.aaa
+ # Fred.new.aaa
# # DEPRECATION WARNING: aaa is deprecated and will be removed from Rails 5.1. (called from irb_binding at (irb):10)
# # => nil
#
- # Fred.bbb
+ # Fred.new.bbb
# # DEPRECATION WARNING: bbb is deprecated and will be removed from Rails 5.1 (use zzz instead). (called from irb_binding at (irb):11)
# # => nil
#
- # Fred.ccc
+ # Fred.new.ccc
# # DEPRECATION WARNING: ccc is deprecated and will be removed from Rails 5.1 (use Bar#ccc instead). (called from irb_binding at (irb):12)
# # => nil
#
@@ -39,7 +37,7 @@ module ActiveSupport
# ActiveSupport::Deprecation.deprecate_methods(Fred, ddd: :zzz, deprecator: custom_deprecator)
# # => [:ddd]
#
- # Fred.ddd
+ # Fred.new.ddd
# DEPRECATION WARNING: ddd is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):15)
# # => nil
#
@@ -48,7 +46,7 @@ module ActiveSupport
# custom_deprecator.deprecate_methods(Fred, eee: :zzz)
# # => [:eee]
#
- # Fred.eee
+ # Fred.new.eee
# DEPRECATION WARNING: eee is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):18)
# # => nil
def deprecate_methods(target_module, *method_names)