From 6ee8032d7afda8de54c7e7f98b051ac589695452 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..e6e8454c 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 + (::BasicObject.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))