diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-25 08:17:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-25 08:17:24 +0000 |
commit | 5ad56e7c0b5a99df526d3bffbb3c6d3461af73be (patch) | |
tree | 775945357a22bac1bdfce41f16b7e1ee23c7a8d0 /load.c | |
parent | 0adeb1c8ab237280896091e9d2034fabf0d050ab (diff) |
load.c: backtrace of circular require
* load.c (load_lock): print backtrace of circular require via
`Warning.warn` [ruby-core:80850] [Bug #13505]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -719,6 +719,8 @@ rb_f_load(int argc, VALUE *argv) return Qtrue; } +extern VALUE rb_mWarning; + static char * load_lock(const char *ftptr) { @@ -742,7 +744,7 @@ load_lock(const char *ftptr) } if (RTEST(ruby_verbose)) { rb_warning("loading in progress, circular require considered harmful - %s", ftptr); - rb_backtrace_print_to(rb_stderr); + rb_backtrace_each(rb_warning_warn, rb_mWarning); } switch (rb_thread_shield_wait((VALUE)data)) { case Qfalse: |