Skip to content

Instantly share code, notes, and snippets.

@alex-quiterio
Last active August 29, 2015 14:01
Show Gist options
  • Save alex-quiterio/eb8bdcde0cf0c55dc4c2 to your computer and use it in GitHub Desktop.
Save alex-quiterio/eb8bdcde0cf0c55dc4c2 to your computer and use it in GitHub Desktop.
class Allocator
# override new class method
def self.new(*args)
print "Hello "
ref = allocate
ref.send(:initialize, *args)
print "\n"
return ref
end
def initialize
print "WORLD"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment