Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. 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]