From d5b00f1260e9f4c1d3d11533472930a809e643ff Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 4 Aug 2024 14:12:04 -0700 Subject: [PATCH] In URI#freeze, synchronize mutex before checking for frozen? This was a race condition. --- lib/rdf/model/uri.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rdf/model/uri.rb b/lib/rdf/model/uri.rb index a1b823f8..9d53b440 100644 --- a/lib/rdf/model/uri.rb +++ b/lib/rdf/model/uri.rb @@ -716,8 +716,8 @@ def dup ## # @private def freeze - unless frozen? - @mutex.synchronize do + @mutex.synchronize do + unless frozen? # Create derived components authority; userinfo; user; password; host; port @value = value.freeze