One way to do this natively in Ruby is to use Method#source_location.
Method#source_location
> helper.method(:label).source_location => ["/Users/myuser/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/actionview-7.0.8.5/lib/action_view/helpers/form_helper.rb", 1143]