-
Allow `get_loaded_model` to succeed when `$LOAD_PATH` contains non-string values (#848) · e075a214Elijah Hamovitz authored
As currently implemented, `get_loaded_model` inspects the `$LOAD_PATH` global for path values when trying to find the path for a model file. This would be fine, except that variable is affected by userspace, which means that it will sometimes contain non-string values, often Pathnames. To avoid responding with the error `Unable to annotate #{model_path}: no implicit conversion of Pathname into String` in this situation, we simply add an explicit `to_s` call before performing string-specific operations. Fixes https://github.com/ctran/annotate_models/issues/758
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| annotate | Loading commit data... | |
| generators/annotate | Loading commit data... | |
| tasks | Loading commit data... | |
| annotate.rb | Loading commit data... |