Prefer method_defined? for the class
parent
c3311da6e2
commit
8372007576
|
@ -59,7 +59,7 @@ class ThreadManager < Array
|
|||
|
||||
# XXX: Preserve Ruby < 2.5 thread exception reporting behavior
|
||||
# https://ruby-doc.org/core-2.5.0/Thread.html#method-c-report_on_exception
|
||||
if Thread.respond_to?(:report_on_exception=)
|
||||
if Thread.method_defined?(:report_on_exception=)
|
||||
Thread.report_on_exception = false
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue