Skip to content

Instantly share code, notes, and snippets.

@havenwood
Last active February 26, 2016 16:07
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 havenwood/8d9f41483e0baebdec59 to your computer and use it in GitHub Desktop.
Save havenwood/8d9f41483e0baebdec59 to your computer and use it in GitHub Desktop.
Example of refinements working from top level except not in irb/pry (run the file like `ruby abs3.rb` and it works)
module Abs3
refine Numeric do
def abs3
self ** 3
end
end
end
using Abs3
puts 3.abs3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment