How to find a module's location
Assuming a file is loaded you can do:
$LOADED_FEATURES.select { |file| File.read(file).include?('module Foo') rescue false }
Assuming a file is loaded you can do:
$LOADED_FEATURES.select { |file| File.read(file).include?('module Foo') rescue false }