Skip to content

Instantly share code, notes, and snippets.

@tychobrailleur
Created February 27, 2011 20:21
Show Gist options
  • Save tychobrailleur/846497 to your computer and use it in GitHub Desktop.
Save tychobrailleur/846497 to your computer and use it in GitHub Desktop.
sebastien@greystones:/tmp$ jruby singleton.rb
hello
world
class A
def stuff
puts 'hello'
end
end
a = A.new
class << a
def stuff
super
puts 'world'
end
end
a.stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment