When monkey patching an instance method, can you call the overridden method from the new implementation?

Say I am monkey patching a method in a class, how could I call the overridden method from the overriding method? I.e. Something a bit like super

E.g.

class Foo
  def bar()
    "Hello"
  end
end 

class Foo
  def bar()
    super() + " World"
  end
end

>> Foo.new.bar == "Hello World"

3 s
3

Leave a Comment