Skip to content

Commit

Permalink
Land #18778, Fix source location tracking for Ruby kernel patches
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-r7 authored Feb 12, 2024
2 parents 3cf3d09 + 2a4d50c commit 2f4a1ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ module Rex
require 'rex/version'

# Overload the Kernel.sleep() function to be thread-safe
Kernel.class_eval("
Kernel.class_eval(<<-EOF, __FILE__, __LINE__ + 1)
def sleep(seconds=nil)
Rex::ThreadSafe.sleep(seconds)
end
")
EOF

# Overload the Kernel.select function to be thread-safe
Kernel.class_eval("
Kernel.class_eval(<<-EOF, __FILE__, __LINE__ + 1)
def select(rfd = nil, wfd = nil, efd = nil, to = nil)
Rex::ThreadSafe.select(rfd, wfd, efd, to)
end
")
EOF

0 comments on commit 2f4a1ac

Please sign in to comment.