From 9a0f5286d7b4410cc3a8d20f48b02493cb139514 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 31 Jul 2015 12:34:54 +0000 Subject: load.c: use rb_load_internal0 * load.c (rb_require_internal): use rb_load_internal0 not to raise a exception to be caught. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- load.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'load.c') diff --git a/load.c b/load.c index 83fea371f6..a67fb38077 100644 --- a/load.c +++ b/load.c @@ -1006,7 +1006,7 @@ rb_require_internal(VALUE fname, int safe) else { switch (found) { case 'r': - rb_load_internal(path, 0); + state = rb_load_internal0(th, path, 0); break; case 's': @@ -1015,8 +1015,10 @@ rb_require_internal(VALUE fname, int safe) rb_ary_push(ruby_dln_librefs, LONG2NUM(handle)); break; } - rb_provide_feature(path); - result = TAG_RETURN; + if (!state) { + rb_provide_feature(path); + result = TAG_RETURN; + } } } } -- cgit v1.2.3