Project

General

Profile

Actions

Bug #13505

closed

circular require prints the backtrace directly to stderr

Added by Eregon (Benoit Daloze) over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Assignee:
-
Target version:
[ruby-core:80850]

Description

The "loading in progress, circular require considered harmful" warning prints the caller backtrace directly to stderr:

    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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0