def Bob::`+`(y) { this.x + y.x } def Bob::Bob() { } attr Bob::x auto b = Bob() auto c = Bob() b.x = 4 c.x = 5 assert_equal(9, b+c)