mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
load.c: use rb_warning directly
This removes the last dependency on rb_mWarning outside of error.c and allows future commits to mark it static. Yes, I expect this to slow down the emitting of a warning message in a cold code path slightly :P git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a489a7d6f
commit
903b6628de
1 changed files with 1 additions and 3 deletions
4
load.c
4
load.c
|
@ -715,8 +715,6 @@ rb_f_load(int argc, VALUE *argv)
|
|||
return Qtrue;
|
||||
}
|
||||
|
||||
extern VALUE rb_mWarning;
|
||||
|
||||
static char *
|
||||
load_lock(const char *ftptr)
|
||||
{
|
||||
|
@ -741,7 +739,7 @@ load_lock(const char *ftptr)
|
|||
if (RTEST(ruby_verbose)) {
|
||||
VALUE warning = rb_warning_string("loading in progress, circular require considered harmful - %s", ftptr);
|
||||
rb_backtrace_each(rb_str_append, warning);
|
||||
rb_warning_warn(rb_mWarning, warning);
|
||||
rb_warning("%"PRIsVALUE, warning);
|
||||
}
|
||||
switch (rb_thread_shield_wait((VALUE)data)) {
|
||||
case Qfalse:
|
||||
|
|
Loading…
Add table
Reference in a new issue