Skip to content

Commit 55afbd0

Browse files
committed
In URI#freeze, synchronize mutex before checking for frozen? This was a race condition.
1 parent 01cd7b6 commit 55afbd0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/rdf/model/uri.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,8 @@ def dup
716716
##
717717
# @private
718718
def freeze
719-
unless frozen?
720-
@mutex.synchronize do
719+
@mutex.synchronize do
720+
unless frozen?
721721
# Create derived components
722722
authority; userinfo; user; password; host; port
723723
@value = value.freeze

0 commit comments

Comments
 (0)