Skip to content

Commit

Permalink
In URI#freeze, synchronize mutex before checking for frozen? This was…
Browse files Browse the repository at this point in the history
… a race condition.
  • Loading branch information
gkellogg committed Aug 4, 2024
1 parent 8f18758 commit d5b00f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rdf/model/uri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5b00f1

Please sign in to comment.