only change thread behavior if on Ruby 2.5 or above

GSoC/Meterpreter_Web_Console
Brent Cook 2018-11-01 18:24:12 -05:00
parent 4dcb31f26b
commit 7cf384405e
1 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,9 @@ 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
Thread.report_on_exception = false if Thread.report_on_exception
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5.0')
Thread.report_on_exception = false if Thread.report_on_exception
end
end
#