mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove deprecated rb_require_safe
This commit is contained in:
parent
4a8acf4625
commit
5a9d2da76e
Notes:
git
2020-05-01 02:33:10 +09:00
2 changed files with 0 additions and 18 deletions
|
@ -32,7 +32,6 @@ int rb_provided(const char*);
|
||||||
int rb_feature_provided(const char *, const char **);
|
int rb_feature_provided(const char *, const char **);
|
||||||
void rb_provide(const char*);
|
void rb_provide(const char*);
|
||||||
VALUE rb_f_require(VALUE, VALUE);
|
VALUE rb_f_require(VALUE, VALUE);
|
||||||
VALUE rb_require_safe(VALUE, int); /* Remove in 3.0 */
|
|
||||||
VALUE rb_require_string(VALUE);
|
VALUE rb_require_string(VALUE);
|
||||||
|
|
||||||
RUBY3_SYMBOL_EXPORT_END()
|
RUBY3_SYMBOL_EXPORT_END()
|
||||||
|
|
17
load.c
17
load.c
|
@ -1087,23 +1087,6 @@ ruby_require_internal(const char *fname, unsigned int len)
|
||||||
return result == TAG_RETURN ? 1 : result ? -1 : 0;
|
return result == TAG_RETURN ? 1 : result ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
|
||||||
rb_require_safe(VALUE fname, int safe)
|
|
||||||
{
|
|
||||||
rb_warn("rb_require_safe will be removed in Ruby 3.0");
|
|
||||||
rb_execution_context_t *ec = GET_EC();
|
|
||||||
int result = require_internal(ec, fname, 1);
|
|
||||||
|
|
||||||
if (result > TAG_RETURN) {
|
|
||||||
EC_JUMP_TAG(ec, result);
|
|
||||||
}
|
|
||||||
if (result < 0) {
|
|
||||||
load_failed(fname);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result ? Qtrue : Qfalse;
|
|
||||||
}
|
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_require_string(VALUE fname)
|
rb_require_string(VALUE fname)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue