path: root/load.c
diff options
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 22:07:36 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 22:07:36 (GMT)
commit903b6628dee594ad76c1ab99766a6f10ca82e2de (patch)
treecd483bd7b772ea669709dafbb680ed31b263b1be /load.c
parent8a489a7d6f1394e22c80d7744ea68e466ec14b26 (diff)
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
1 files changed, 1 insertions, 3 deletions
diff --git a/load.c b/load.c
index 5034691..fe1d028 100644
--- a/load.c
+++ b/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: