* doc/syntax/modules_and_classes.rdoc: Improved description of methods
on a module or class as suggested by Tobias Buhlmann git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3b983407ef
commit
4061f5b6fc
@ -1,3 +1,8 @@
|
|||||||
|
Sat Jan 5 13:58:59 2013 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* doc/syntax/modules_and_classes.rdoc: Improved description of methods
|
||||||
|
on a module or class as suggested by Tobias Buhlmann
|
||||||
|
|
||||||
Sat Jan 5 13:38:07 2013 Masaki Matsushita <glass.saga@gmail.com>
|
Sat Jan 5 13:38:07 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||||
|
|
||||||
* string.c (rb_str_enumerate_lines): fix invalid byte sequence error
|
* string.c (rb_str_enumerate_lines): fix invalid byte sequence error
|
||||||
|
@ -120,8 +120,13 @@ If a constant is defined at the top-level you may preceded it with
|
|||||||
|
|
||||||
=== Methods
|
=== Methods
|
||||||
|
|
||||||
Class methods (also known as module functions, see Module#module_function) may
|
For method definition documentation see the {syntax documentation for
|
||||||
be called directly.
|
methods}[rdoc-ref:doc/syntax/methods.rdoc].
|
||||||
|
|
||||||
|
Class methods may be called directly. (This is slightly confusing, but a
|
||||||
|
method on a module is often called a "class method" instead of a "module
|
||||||
|
method". See also Module#module_function which can convert an instance method
|
||||||
|
into a class method.)
|
||||||
|
|
||||||
When a class method references a constant it uses the same rules as referencing
|
When a class method references a constant it uses the same rules as referencing
|
||||||
it outside the method as the scope is the same.
|
it outside the method as the scope is the same.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user