Tenderlove Making - Monkey Patch Detection in Ruby
19-Oct-2024 123
My last post detailed one way that CRuby will eliminate some intermediate array allocations when using methods like Array#hash and Array#max. Part of the technique hinges on detecting when someone monkey patches array. Today, I thought we’d dive a little bit in to how CRuby detects and de-optimizes itself when these “important” methods get monkey patched.
.
Tenderlove Making - Monkey Patch Detection in Ruby #ruby #rubydeveloper #rubyonrails #Tenderlove #Making #Monkey #Patch #Detection https://rubyonrails.ba/link/tenderlove-making-monkey-patch-detection-in-ruby