Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Module#refine

refine(mod) { block } → module

Refine mod in the receiver.

Returns a module, where refined methods are defined.

Ruby version changes

  1. 3.1
    • New class which represents a module created by Module#refine. include and prepend are deprecated, and import_methods is added instead. [Bug #17429]