From e1a20c3249e399502fee02aa6fffa0863f808c86 Mon Sep 17 00:00:00 2001 From: David Genord II Date: Tue, 13 Aug 2024 11:56:50 -0400 Subject: [PATCH] Fix BasicObject cleanup --- lib/delayed/message_sending.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/delayed/message_sending.rb b/lib/delayed/message_sending.rb index 6e1e834a..27b341c9 100644 --- a/lib/delayed/message_sending.rb +++ b/lib/delayed/message_sending.rb @@ -1,7 +1,9 @@ module Delayed class DelayProxy < BasicObject - undef_method :== - undef_method :equal? + # What additional methods exist on BasicObject has changed over time + (::Object.instance_methods - [:__id__, :__send__, :instance_eval, :instance_exec]).each do |method| + undef_method method + end # Let DelayProxy raise exceptions. define_method(:raise, ::Object.instance_method(:raise))