diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-20 22:07:36 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-20 22:07:36 +0000 |
commit | 903b6628dee594ad76c1ab99766a6f10ca82e2de (patch) | |
tree | cd483bd7b772ea669709dafbb680ed31b263b1be /load.c | |
parent | 8a489a7d6f1394e22c80d7744ea68e466ec14b26 (diff) | |
download | ruby-903b6628dee594ad76c1ab99766a6f10ca82e2de.tar.gz |
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
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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: |