concept refinement in category ruby

This is an excerpt from Manning's book The Well-Grounded Rubyist, Third Edition.
The using method flips the switch: once you “use” the module in which you’ve defined the refinement you want, the target class adopts the new behaviors. In the example, we use the Shout module inside the Person class. That means that for the duration of that class (from the using statement to the end of the class definition), strings will be “refined” so that they have the shout method.
The effect of “using” a refinement comes to an end with the end of the class (or module) definition in which you declare that you’re using the refinement. You can actually use using outside of a class or module definition, in which case the effect of the refinement persists to the end of the file in which the call to using occurs. If you were to open the class again in a different file, the refinement would no longer be in effect.
Refinements can help you make temporary changes to core classes in a relatively safe way. For making changes to fundamental Ruby classes such as Array and String, refinement has become the preferred method of execution. Other program files and libraries your program uses at runtime won’t be affected by your refinements.