From 89ea0e8bd62e10c4a902fa5625c8b6499f15a462 Mon Sep 17 00:00:00 2001 From: nick evans Date: Tue, 6 May 2025 08:54:50 -0400 Subject: [PATCH 1/2] =?UTF-8?q?=E2=8F=AA=20Revert=20Ractor=20sharability?= =?UTF-8?q?=20for=20config=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was just one piece of making config objects ractor sharable—it is insufficient by itself. And it caused problems with earlier versions of ruby 3.0. It should not have been committed to the v0.4-stable branch. Fixes: #471 Reported-by: @glaszig Reported-by: @mumkymikey --- lib/net/imap/config/attr_type_coercion.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/net/imap/config/attr_type_coercion.rb b/lib/net/imap/config/attr_type_coercion.rb index e0db0784..0941d1b7 100644 --- a/lib/net/imap/config/attr_type_coercion.rb +++ b/lib/net/imap/config/attr_type_coercion.rb @@ -28,11 +28,8 @@ def self.included(mod) end private_class_method :included - if defined?(Ractor.make_shareable) - def self.safe(...) Ractor.make_shareable nil.instance_eval(...).freeze end - else - def self.safe(...) nil.instance_eval(...).freeze end - end + # Used in v0.5.8+ for Ractor sharability. + def self.safe(...) nil.instance_eval(...).freeze end private_class_method :safe Types = Hash.new do |h, type| From 1608a0af8dd5219e4c1e1b9899770def52ee8dea Mon Sep 17 00:00:00 2001 From: nick evans Date: Tue, 6 May 2025 09:23:03 -0400 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=96=20Bump=20version=20to=20v0.4.2?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/net/imap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 84bc0946..5cc11478 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -761,7 +761,7 @@ module Net # * {IMAP URLAUTH Authorization Mechanism Registry}[https://www.iana.org/assignments/urlauth-authorization-mechanism-registry/urlauth-authorization-mechanism-registry.xhtml] # class IMAP < Protocol - VERSION = "0.4.21" + VERSION = "0.4.22" # Aliases for supported capabilities, to be used with the #enable command. ENABLE_ALIASES = {