Use require_relative instead of require#312
Conversation
|
Hmm. Could you remove Let's work on it as a separated PR. |
Yes, I'll remove Oh, I didn't know that
Sure! |
GitHub: test-unitGH-311 This patch will reduce dependency on `$LOAD_PATH`. It replaces `require` with `require_relative` for internal library files. This change is applied only when the replacement can be done statically and simply. More advanced replacements are out of scope for this patch, such as: * Using `autoload` * Changes under `test/` Co-authored-by: Sutou Kouhei <[email protected]>
e564ff0 to
54ea7f5
Compare
|
The remaining $ git grep --line-number --word-regexp require -- :^doc/ :^sample/ :^test/External libraries
More advanced replacements
Just comments
No change neededThese are
|
Co-authored-by: Sutou Kouhei <[email protected]>
GitHub: fix test-unitGH-311 This is a follow-up to test-unitGH-312 and the final patch to fix test-unitGH-311. This patch will reduce dependency on `$LOAD_PATH`. It replaces `require` with `require_relative` for internal library files in `test/`. If you want to run tests against the installed `test-unit`, you can still use the `test/` directory like this: This example runs tests against the installed `test-unit` version 3.6.8. ```console $ ruby -I $(gem env home)/gems/test-unit-3.6.8/lib test-unit test ```
GitHub: fix test-unitGH-311 This is a follow-up to test-unitGH-312 and the final patch to fix test-unitGH-311. This patch will reduce dependency on `$LOAD_PATH`. It replaces `require` with `require_relative` for internal library files in `test/`. If you want to run tests against the installed `test-unit`, you can still use the `test/` directory like this: This example runs tests against the installed `test-unit` version 3.6.8. ```console $ ruby -I $(gem env home)/gems/test-unit-3.6.8/lib bin/test-unit test ```
GitHub: fix GH-311 This is a follow-up to GH-312 and the final patch to fix GH-311. This patch will reduce dependency on `$LOAD_PATH`. It replaces `require` with `require_relative` for internal library files in `test/`. If you want to run tests against the installed `test-unit`, you can still use the `test/` directory like this: This example runs tests against the installed `test-unit` version 3.6.8. ```console $ ruby -I $(gem env home)/gems/test-unit-3.6.8/lib bin/test-unit test ```
GitHub: GH-311
This patch will reduce dependency on
$LOAD_PATH.It replaces
requirewithrequire_relativefor internal libraryfiles. This change is applied only when the replacement can be done
statically and simply.
More advanced replacements are out of scope for this patch, such as:
autoloadtest/