Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 054805a

Browse files
committedNov 5, 2018
Finish 3.0.6
2 parents 52109c1 + 8242e5f commit 054805a

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed
 

‎VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.5
1+
3.0.6

‎lib/rdf/format.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def self.each(file_name: nil,
8484
when content_type
8585
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
8686
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
87-
mime_type = content_type.to_s.split(';').first # remove any media type parameters
87+
mime_type = content_type.to_s.split(';').first.to_s # remove any media type parameters
8888

8989
# Ignore text/plain, a historical encoding for N-Triples, which is
9090
# problematic in format detection, as many web servers will serve

‎lib/rdf/model/uri.rb

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class URI
5757

5858
IQUERY = Regexp.compile("(?:#{IPCHAR}|#{IPRIVATE}|/|\\?)*").freeze
5959

60-
IFRAGMENT = Regexp.compile("(?:#{IPCHAR}|/|\\?)*").freeze.freeze
60+
IFRAGMENT = Regexp.compile("(?:#{IPCHAR}|/|\\?)*").freeze
6161

6262
ISEGMENT = Regexp.compile("(?:#{IPCHAR})*").freeze
6363
ISEGMENT_NZ = Regexp.compile("(?:#{IPCHAR})+").freeze
@@ -223,6 +223,7 @@ def self.normalize_path(path)
223223
# @param [Boolean] canonicalize (false)
224224
def initialize(*args, validate: false, canonicalize: false, **options)
225225
@value = @object = @hash = nil
226+
@mutex = Mutex.new
226227
uri = args.first
227228
if uri
228229
@value = uri.to_s
@@ -665,12 +666,14 @@ def dup
665666
# @private
666667
def freeze
667668
unless frozen?
668-
# Create derived components
669-
authority; userinfo; user; password; host; port
670-
@value = value.freeze
671-
@object = object.freeze
672-
@hash = hash.freeze
673-
super
669+
@mutex.synchronize do
670+
# Create derived components
671+
authority; userinfo; user; password; host; port
672+
@value = value.freeze
673+
@object = object.freeze
674+
@hash = hash.freeze
675+
super
676+
end
674677
end
675678
self
676679
end

0 commit comments

Comments
 (0)
Please sign in to comment.