News for hackers. Stuff that matters.
Re:Ruby 3.2.0 Is from Another Dimension by lcnPylGDnU4H9OF on Wednesday January 04, 2023 @06:05PM (#34253265)
> I hate that I can't easy determine where a given method of an arbitrary object is defined.

https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debugger...

The relevant bit is under the heading:

> I’m calling a method, but I don’t know where it goes

  def index
    p method(:render).source_location
    render params[:id]
  end
It sounds like this is the answer to your monkey-patching woes.

  my_object.method(:my_method).source_location # returns path/to/file:[line number]

There are no comments on this comment yet.