aboutsummaryrefslogtreecommitdiffstats
path: root/load.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-31 12:34:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-31 12:34:54 +0000
commit9a0f5286d7b4410cc3a8d20f48b02493cb139514 (patch)
tree2248d1c7ca6bdfa01ec6673b66cb646da7f22c79 /load.c
parentb00ba0a957cd3b80138ac5a2459e67d9e78425ef (diff)
downloadruby-9a0f5286d7b4410cc3a8d20f48b02493cb139514.tar.gz
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.c8
1 files changed, 5 insertions, 3 deletions
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;
+ }
}
}
}