Skip to content

Instantly share code, notes, and snippets.

@mehdi-farsi
Last active September 8, 2018 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehdi-farsi/6f06e10d1524c7795f786c1b25cf44bd to your computer and use it in GitHub Desktop.
Save mehdi-farsi/6f06e10d1524c7795f786c1b25cf44bd to your computer and use it in GitHub Desktop.
module Patch
@@res = refine(Array) {}
def self.res; @@res; end
end
p Patch.res # => #<refinement:Array@Patch>
p Patch.res.class # => Module
p Patch.res.ancestors # => [#<refinement:Array@Patch>, Array, ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment