aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-11-29 07:11:19 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-11-29 07:11:19 -0800
commitc85957ec7c247063cdc2f429c59132935ee64350 (patch)
tree527e12e708056cb7bae23cde7893b2187d862f8f /activesupport
parent2be3694964b179e6fbe4b1d1d3a12def9d1a5c43 (diff)
parente40ac155cadac5162a802f3e36a66198f215417d (diff)
downloadrails-c85957ec7c247063cdc2f429c59132935ee64350.tar.gz
rails-c85957ec7c247063cdc2f429c59132935ee64350.tar.bz2
rails-c85957ec7c247063cdc2f429c59132935ee64350.zip
Merge pull request #13092 from laurocaetano/improve_documentation_for_delegate
Improve Module#delegate documentation.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/module/delegation.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb
index 182e74d9e1..58146cdf7a 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -138,6 +138,8 @@ class Module
#
# Foo.new("Bar").name # raises NoMethodError: undefined method `name'
#
+ # The target method must be public, otherwise it will raise +NoMethodError+.
+ #
def delegate(*methods)
options = methods.pop
unless options.is_a?(Hash) && to = options[:to]