method_source
method_source copied to clipboard
Removed file caching to allow live reloading of files
This way if you reload a file that defines a proc or a method the source updates. It also prevents SourceNotFound errors in case the proc or method definition moves within the file.
I'd be good to have a public API to delete a file from this hash, right now I'm doing this
MethodSource.instance_variable_get(:@lines_for_file).delete(absolute_path)
but it feels kind of weird 🤔, thanks guys.