From: eregontp@... Date: 2017-04-24T20:45:20+00:00 Subject: [ruby-core:80850] [Ruby trunk Bug#13505] circular require prints the backtrace directly to stderr Issue #13505 has been reported by Eregon (Benoit Daloze). ---------------------------------------- Bug #13505: circular require prints the backtrace directly to stderr https://bugs.ruby-lang.org/issues/13505 * Author: Eregon (Benoit Daloze) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.0dev (2017-04-24 trunk 58466) [x86_64-linux] * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- The "loading in progress, circular require considered harmful" warning prints the caller backtrace directly to stderr: ~~~ c if (RTEST(ruby_verbose)) { rb_warning("loading in progress, circular require considered harmful - %s", ftptr); rb_backtrace_print_to(rb_stderr); } ~~~ This is suboptimal as rb_warning now eventually delegates to Warning.warn, which can handle the warning, but not the backtrace printed separetely to $stderr. I think the backtrace should be sent together to Warning.warn so the entire warning can be treated/filtered/etc correctly in Warning.warn. -- https://bugs.ruby-lang.org/ Unsubscribe: