summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2022-03-11 19:21:50 -0800
committerJohn Hawthorn <john@hawthorn.email>2022-06-23 13:50:26 -0700
commit962a3247b1b76770930200bcce7470a54dfb25c9 (patch)
tree5f84126dd0cd1a78b6c9b9da45f91be6ffa3e10d /doc
parentb180ffa62270dc32bb69167822b4c698def5c8f7 (diff)
Correct documentation for protected methods [ci skip]
Diffstat (limited to 'doc')
-rw-r--r--doc/syntax/modules_and_classes.rdoc4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/syntax/modules_and_classes.rdoc b/doc/syntax/modules_and_classes.rdoc
index 6122f6e08e..9c83a319b9 100644
--- a/doc/syntax/modules_and_classes.rdoc
+++ b/doc/syntax/modules_and_classes.rdoc
@@ -155,8 +155,8 @@ Ruby has three types of visibility. The default is +public+. A public method
may be called from any other object.
The second visibility is +protected+. When calling a protected method the
-sender must be a subclass of the receiver or the receiver must be a subclass of
-the sender. Otherwise a NoMethodError will be raised.
+receiver must inherit the Class or Module which defines the method. Otherwise a
+NoMethodError will be raised.
Protected visibility is most frequently used to define <code>==</code> and
other comparison methods where the author does not wish to expose an object's