Skip to content

Instantly share code, notes, and snippets.

@lazyatom
Created December 18, 2015 14:40
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 lazyatom/6606b777c062ac8e1b84 to your computer and use it in GitHub Desktop.
Save lazyatom/6606b777c062ac8e1b84 to your computer and use it in GitHub Desktop.
Do refinements work in JRuby?
module Refinement
refine Object do
def new_method
'new method!'
end
end
end
class Thing
using Refinement
def test
puts Object.new.new_method
end
end
Thing.new.test
NoMethodError: undefined method `new_method' for #<Object:0x7c8740de>
test at test.rb:13
<top> at test.rb:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment