From 014a9e05877951f901092297f49a7ac2b2396939 Mon Sep 17 00:00:00 2001 From: stomar Date: Mon, 24 Dec 2018 21:14:38 +0000 Subject: Small improvement in refinements docs Move general statement about refinements of modules from example to the top of the document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- doc/syntax/refinements.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/syntax/refinements.rdoc b/doc/syntax/refinements.rdoc index 34ca3a1983..e2d9cdc407 100644 --- a/doc/syntax/refinements.rdoc +++ b/doc/syntax/refinements.rdoc @@ -7,7 +7,7 @@ changes. This can cause unintended side-effects or breakage of programs. Refinements are designed to reduce the impact of monkey patching on other users of the monkey-patched class. Refinements provide a way to extend a -class locally. +class locally. Refinements can modify both classes and modules. Here is a basic refinement: @@ -26,7 +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 can modify both classes and modules. +Module#refine. 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 -- cgit v1.2.3