From 51130a40f8cbcd076db4148c3b4ef67b4a1502bd Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 25 Apr 2017 08:17:24 +0000 Subject: 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 --- error.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'error.c') diff --git a/error.c b/error.c index e431a6f9b9..45106de851 100644 --- a/error.c +++ b/error.c @@ -145,10 +145,16 @@ rb_warning_s_warn(VALUE mod, VALUE str) return Qnil; } +VALUE +rb_warning_warn(VALUE mod, VALUE str) +{ + return rb_funcallv(mod, id_warn, 1, &str); +} + static void rb_write_warning_str(VALUE str) { - rb_funcall(rb_mWarning, id_warn, 1, str); + rb_warning_warn(rb_mWarning, str); } static VALUE -- cgit v1.2.3