From 02151dad1ba324fac5f8e9459334164d01893124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Sun, 4 Aug 2019 13:09:30 +0200 Subject: `$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. --- test/ruby/test_require.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3