[DOC] Refinements on modules are allowed
From: Leo Correa <lcorr005@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3f7221ad3d
commit
b0d1586fa7
@ -26,8 +26,7 @@ Here is a basic refinement:
|
||||
end
|
||||
|
||||
First, a class +C+ is defined. Next a refinement for +C+ is created using
|
||||
Module#refine. Refinements only modify classes, not modules so the argument
|
||||
must be a class.
|
||||
Module#refine. Refinements can modify both classes and modules.
|
||||
|
||||
Module#refine creates an anonymous module that contains the changes or
|
||||
refinements to the class (+C+ in the example). +self+ in the refine block is
|
||||
|
Loading…
x
Reference in New Issue
Block a user