# redef is a super simple way to robustly override methods - providing the # POLS method of referring to the previous method as (wait for it) super. # it's really that simple # require 'redef' class C def foo() 30 end p C.new.foo #=> 30 redef do def foo() super + 2 end end p C.new.foo #=> 32 redef do def foo() super + 10 end end p C.new.foo #=> 42 end