Skip to content

Instantly share code, notes, and snippets.

@fronx
Created January 8, 2010 12:23
Show Gist options
  • Save fronx/272021 to your computer and use it in GitHub Desktop.
Save fronx/272021 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'reincarnation'
module A
def foo
"foo"
end
end
module B
include A
end
A.reincarnate
module A
def foo
super.gsub('f', 'b')
end
end
include B
puts foo
# => 'foo' # :((
module B
include A
end
include B
puts foo
# => 'boo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment