mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Send the backtrace of the circular require warning as a single String to Warning.warn
* load.c: send as a single string. * error.c: expose the string formatted by rb_warning as rb_warning_string(). * test/ruby/test_exception.rb: update tests. [ruby-core:80850] [Bug #13505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
29ca20de2d
commit
acde55201b
4 changed files with 14 additions and 4 deletions
5
load.c
5
load.c
|
@ -743,8 +743,9 @@ load_lock(const char *ftptr)
|
|||
return (char *)"";
|
||||
}
|
||||
if (RTEST(ruby_verbose)) {
|
||||
rb_warning("loading in progress, circular require considered harmful - %s", ftptr);
|
||||
rb_backtrace_each(rb_warning_warn, rb_mWarning);
|
||||
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);
|
||||
}
|
||||
switch (rb_thread_shield_wait((VALUE)data)) {
|
||||
case Qfalse:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue