summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-04 13:09:30 +0200
committerKazuhiro NISHIYAMA <znz@users.noreply.github.com>2021-02-16 18:11:13 +0900
commit02151dad1ba324fac5f8e9459334164d01893124 (patch)
tree2a3d7a6de67afc8eb2ae06830e69edde7fa1a040 /load.c
parent37b90bcdc17f1cd2c088db7db506ed7f5b2a775f (diff)
downloadruby-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 'load.c')
-rw-r--r--load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/load.c b/load.c
index cf3adcbb3e..d6616fc5cd 100644
--- a/load.c
+++ b/load.c
@@ -991,7 +991,7 @@ rb_resolve_feature_path(VALUE klass, VALUE fname)
sym = ID2SYM(rb_intern("so"));
break;
default:
- load_failed(fname);
+ return Qnil;
}
return rb_ary_new_from_args(2, sym, path);