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 | 2661b393cf31f83ca153ce5b4f529093fc54d4c7 (patch) | |
tree | cd483bd7b772ea669709dafbb680ed31b263b1be /load.c | |
parent | ddb9e19f692e9f6259fc7191b17eb06f52f2b608 (diff) | |
download | ruby-2661b393cf31f83ca153ce5b4f529093fc54d4c7.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: |