This content originally appeared on DEV Community and was authored by Augusts Bautra
Consider this:
def name
binding.pry
"#{super} #{last_name}"
end
You pry into a method and want to find out the source/location of other called methods. Usually this is easy, just method(:last_name).source
or method(:last_name).source_location
and voila. But what if the method calls super
? 🤔
Not to worry, #super_method
to the rescue:
> method(__method__).super_method.source
> method(__method__).super_method.source_location
This content originally appeared on DEV Community and was authored by Augusts Bautra

Augusts Bautra | Sciencx (2025-09-08T11:22:51+00:00) TIL #super_method. Retrieved from https://www.scien.cx/2025/09/08/til-super_method/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.