diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-08-04 13:09:30 +0200 |
---|---|---|
committer | Kazuhiro NISHIYAMA <znz@users.noreply.github.com> | 2021-02-16 18:11:13 +0900 |
commit | 02151dad1ba324fac5f8e9459334164d01893124 (patch) | |
tree | 2a3d7a6de67afc8eb2ae06830e69edde7fa1a040 /test | |
parent | 37b90bcdc17f1cd2c088db7db506ed7f5b2a775f (diff) | |
download | ruby-02151dad1ba324fac5f8e9459334164d01893124.tar.gz |
`$LOAD_PATH.resolve_feature_path` should not raise
I think it's more friendly and easier to work with to return `nil` when
the feature is not found in the $LOAD_PATH.
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_require.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 30c07b9e5c..973d9c92f1 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -857,5 +857,9 @@ class TestRequire < Test::Unit::TestCase $:.replace(paths) $".replace(loaded) end + + def test_resolve_feature_path_with_missing_feature + assert_nil($LOAD_PATH.resolve_feature_path("superkalifragilisticoespialidoso")) + end end end |