Skip to content

Instantly share code, notes, and snippets.

@gabrielg
Created February 4, 2010 00:28
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 gabrielg/294228 to your computer and use it in GitHub Desktop.
Save gabrielg/294228 to your computer and use it in GitHub Desktop.
class Tricksy
def self.lulz
puts "denied"
end
def self.singleton_method_added(name)
Object.const_set(:Tricksy, RealTricksy) if defined?(RealTricksy)
end
RealTricksy = self.clone
end
task :default do
load "lib/tricksy.rb"
Tricksy.lulz
SuperTricksy.lulz
end
class Tricksy
def self.lulz
puts "lulz"
end
end
class SuperTricksy
def self.lulz
puts "super lulz"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment