In Ruby, classes are never closed: methods can always be added to an existing class. This applies to "all" classes, including the standard, built-in classes. All that is needed to do is open up a class definition for an existing class, and the new contents specified will be added to the existing contents. A simple example of adding a new method to the standard library's codice_22 class:

Adding methods to previously defined classes is often called [[monkey patch|monkey-patching]]. However, if performed recklessly, this practice can lead to collisions of behavior and subsequent unexpected results, and problems with code scalability.

ଉଦାହରଣ
Open classes
Classes
ବାହାର ଲିଙ୍କ