Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created March 5, 2013 00:37
Show Gist options
  • Save havenwood/5087024 to your computer and use it in GitHub Desktop.
Save havenwood/5087024 to your computer and use it in GitHub Desktop.
brittle example (irc)
module Change
def Change.included klass
klass.class_eval do
def klass.change
def changed?; true end
end
end
end
end
class Without
include Change
def changed?; false end
end
class With
include Change
def changed?; false end
end
With.change
With.new.changed?
#=> true
Without.new.changed?
#=> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment