diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-31 12:34:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-31 12:34:54 +0000 |
commit | 9a0f5286d7b4410cc3a8d20f48b02493cb139514 (patch) | |
tree | 2248d1c7ca6bdfa01ec6673b66cb646da7f22c79 /load.c | |
parent | b00ba0a957cd3b80138ac5a2459e67d9e78425ef (diff) |
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
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; + } } } } |