mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 12:34:21 +00:00
rb_bug shouldn't assume ec is available (don't use GET_EC())
ec is unavailable on timer thread, for instance.
This commit is contained in:
parent
48eb907f6b
commit
d869164124
4
error.c
4
error.c
@ -1090,7 +1090,7 @@ rb_bug_without_die_internal(const char *fmt, va_list args)
|
||||
const char *file = NULL;
|
||||
int line = 0;
|
||||
|
||||
if (GET_EC()) {
|
||||
if (rb_current_execution_context(false)) {
|
||||
file = rb_source_location_cstr(&line);
|
||||
}
|
||||
|
||||
@ -1123,7 +1123,7 @@ rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const voi
|
||||
const char *file = NULL;
|
||||
int line = 0;
|
||||
|
||||
if (GET_EC()) {
|
||||
if (rb_current_execution_context(false)) {
|
||||
file = rb_source_location_cstr(&line);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user