Improve function of Thread::Backtrace::Location #path and #absolute_path
I was working on this issue in Rails and hit an area where Backtrace Location can be improved
- It is undefined in the documentation how #absolute_path should operate when #path is invalid (in case of instance eval)
- There are a few conditions where #path and #absolute_path can return nil, this forces extra protection code when parsing paths to check for nil. (for example getting filename)
- Instead of returning Qnil from location_path and location_absolute_path on invalid conditions, return the string "(unknown)" which is easier to parse and sticks out better in a big backtrace. There is precedent here with the string "(eval)"
- If path is invalid have absolute_path return "(unknown)", define that in the documentation
- (possible) add an additional method on caller_location called #filename so people stop parsing filename from #path and #absolute_path
- Evaluate if it makes sense to have #path and #absolute_path in the API as both methods can return full paths so the semantic difference is subtle.