Prefer method_defined? for the class

GSoC/Meterpreter_Web_Console
William Vu 2018-11-02 00:34:17 -05:00
parent c3311da6e2
commit 8372007576
1 changed files with 1 additions and 1 deletions

View File

@ -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