From 70f56f7337537812b43f15d7b2ebac39890c8f26 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 4 Jan 2024 17:32:28 +0100 Subject: [PATCH] Remove unused Mutex_m in Active Model Close #241 Ref: - rails/rails@bcdeea5da7657375df21a856135ae7a66a8c3812 - rails/rails#49674 - rails/rails@2992faa45b1b3842e1df30384bba496bb315d09d - rails/rails#29788 --- lib/validates_timeliness/orm/active_model.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/validates_timeliness/orm/active_model.rb b/lib/validates_timeliness/orm/active_model.rb index c2adc76..08c0fd5 100644 --- a/lib/validates_timeliness/orm/active_model.rb +++ b/lib/validates_timeliness/orm/active_model.rb @@ -42,9 +42,7 @@ def define_timeliness_method(attr_name, before_type_cast=false) # Lazy instantiate module as container of timeliness methods included in the model def generated_timeliness_methods - @generated_timeliness_methods ||= Module.new { |m| - extend Mutex_m - }.tap { |mod| include mod } + @generated_timeliness_methods ||= Module.new.tap { |mod| include mod } end def timeliness_method_already_implemented?(method_name)