aboutsummaryrefslogtreecommitdiffstats
path: root/doc/syntax/modules_and_classes.rdoc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-16 23:36:46 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-16 23:36:46 +0000
commit1eb9f71c3ae41182a08cd965340854f116354827 (patch)
tree6abb5b7bc584ebd726a299941569de8c89376e7a /doc/syntax/modules_and_classes.rdoc
parent038c535e18549740c34d63efc3326c8e12379317 (diff)
downloadruby-1eb9f71c3ae41182a08cd965340854f116354827.tar.gz
* doc/syntax/miscellaneous.rdoc: Added documentation for alias, undef,
BEGIN, END. * doc/syntax/modules_and_classes.rdoc (Constants): Fixed unwrapped paragraph with trailing whitespace. * doc/syntax/modules_and_classes.rdoc (Scope): Added section pointing to alias and undef documentation. * doc/syntax.rdoc: Added link to miscellaneous section. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/syntax/modules_and_classes.rdoc')
-rw-r--r--doc/syntax/modules_and_classes.rdoc11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/syntax/modules_and_classes.rdoc b/doc/syntax/modules_and_classes.rdoc
index 2c8f5321e0..f4ab1ea6f9 100644
--- a/doc/syntax/modules_and_classes.rdoc
+++ b/doc/syntax/modules_and_classes.rdoc
@@ -93,8 +93,9 @@ nesting:
end
end
-However, if you use <code>::</code> to define <code>A::B</code> without nesting
-it inside +A+ a NameError exception will be raised because the nesting does not include +A+:
+However, if you use <code>::</code> to define <code>A::B</code> without
+nesting it inside +A+ a NameError exception will be raised because the nesting
+does not include +A+:
module A
Z = 1
@@ -193,6 +194,12 @@ The third visibility is +private+. A private method may not be called with a
receiver, not even +self+. If a private method is called with a receiver a
NoMethodError will be raised.
+=== +alias+ and +undef+
+
+You may also alias or undefine methods, but these operations are not
+restricted to modules or classes. See the {miscellaneous syntax
+section}[rdoc-ref:syntax/miscellaneous.rdoc] for documentation.
+
= Classes
Every class is also a module, but unlike modules a class may not be mixed-in to