From ac84c2aee2c576247e7961491904f909e8b9ab66 Mon Sep 17 00:00:00 2001 From: nagachika Date: Fri, 16 Feb 2018 15:27:37 +0000 Subject: merge revision(s) 58471,58493: [Backport #13505] load.c: backtrace of circular require * load.c (load_lock): print backtrace of circular require via `Warning.warn` [ruby-core:80850] [Bug #13505] 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/branches/ruby_2_4@62435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal.h') diff --git a/internal.h b/internal.h index cb758b94ad..6012376353 100644 --- a/internal.h +++ b/internal.h @@ -1033,6 +1033,8 @@ VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method); rb_name_err_raise_str(rb_fstring_cstr(mesg), (recv), (name)) NORETURN(void ruby_only_for_internal_use(const char *)); #define ONLY_FOR_INTERNAL_USE(func) ruby_only_for_internal_use(func) +VALUE rb_warning_warn(VALUE mod, VALUE str); +VALUE rb_warning_string(const char *fmt, ...); /* eval.c */ VALUE rb_refinement_module_get_refined_class(VALUE module); @@ -1641,7 +1643,7 @@ void rb_backtrace_print_as_bugreport(void); int rb_backtrace_p(VALUE obj); VALUE rb_backtrace_to_str_ary(VALUE obj); VALUE rb_backtrace_to_location_ary(VALUE obj); -void rb_backtrace_print_to(VALUE output); +void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output); VALUE rb_vm_backtrace_object(void); RUBY_SYMBOL_EXPORT_BEGIN -- cgit v1.2.3