Skip to content

Instantly share code, notes, and snippets.

@emiltin
Created April 15, 2010 20:42
Show Gist options
  • Save emiltin/367621 to your computer and use it in GitHub Desktop.
Save emiltin/367621 to your computer and use it in GitHub Desktop.
class A
attr_accessor :value
def initialize
@value = 1
end
def + other
@value + other.value
end
end
a=A.new
b=A.new
puts a+b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment