Skip to content

Instantly share code, notes, and snippets.

@headius
Created April 7, 2015 22:09
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 headius/a4dd3b18b0eae7dfcd1a to your computer and use it in GitHub Desktop.
Save headius/a4dd3b18b0eae7dfcd1a to your computer and use it in GitHub Desktop.
module Blah
refine String do
def split(*)
['foo', 'bar']
end
end
end
module Baz
refine Integer do; end
end
class Foo
using Blah
p 'hello'.split('l')
end
class Foo
using Baz
p 'hello'.split('l')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment