* 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
This commit is contained in:
nobu 2015-07-31 12:34:54 +00:00
Родитель b00ba0a957
Коммит 9a0f5286d7
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Jul 31 21:34:49 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* load.c (rb_require_internal): use rb_load_internal0 not to raise
a exception to be caught.
Thu Jul 30 13:19:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> Thu Jul 30 13:19:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* variable.c (rb_const_get_0): warn deprecated constant reference. * variable.c (rb_const_get_0): warn deprecated constant reference.

4
load.c
Просмотреть файл

@ -1006,7 +1006,7 @@ rb_require_internal(VALUE fname, int safe)
else { else {
switch (found) { switch (found) {
case 'r': case 'r':
rb_load_internal(path, 0); state = rb_load_internal0(th, path, 0);
break; break;
case 's': case 's':
@ -1015,11 +1015,13 @@ rb_require_internal(VALUE fname, int safe)
rb_ary_push(ruby_dln_librefs, LONG2NUM(handle)); rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
break; break;
} }
if (!state) {
rb_provide_feature(path); rb_provide_feature(path);
result = TAG_RETURN; result = TAG_RETURN;
} }
} }
} }
}
TH_POP_TAG(); TH_POP_TAG();
load_unlock(ftptr, !state); load_unlock(ftptr, !state);