I’ve been thinking about how one might write a long-running system in Ruby
where there is a requirement to be able to update the definition of some
things while the system is still running.
I know I can use ‘load’ to re-read a file, but for purposes of efficiency, it
would be nice to be able to only re-read it if the file has been modified
since it was last loaded.
Is there already a way to do this? If not, is there a method somewhere that
returns the path to the file that ‘load’ or ‘require’ would process? Ie,
something that scans the library path to find the right one?
Obviously, this would be fairly easy to write, but I’d prefer not to re-invent