Skip to content

Commit

Permalink
Finish 3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Nov 5, 2018
2 parents 52109c1 + 8242e5f commit 054805a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.5
3.0.6
2 changes: 1 addition & 1 deletion lib/rdf/format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def self.each(file_name: nil,
when content_type
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
mime_type = content_type.to_s.split(';').first # remove any media type parameters
mime_type = content_type.to_s.split(';').first.to_s # remove any media type parameters

# Ignore text/plain, a historical encoding for N-Triples, which is
# problematic in format detection, as many web servers will serve
Expand Down
17 changes: 10 additions & 7 deletions lib/rdf/model/uri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class URI

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

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

ISEGMENT = Regexp.compile("(?:#{IPCHAR})*").freeze
ISEGMENT_NZ = Regexp.compile("(?:#{IPCHAR})+").freeze
Expand Down Expand Up @@ -223,6 +223,7 @@ def self.normalize_path(path)
# @param [Boolean] canonicalize (false)
def initialize(*args, validate: false, canonicalize: false, **options)
@value = @object = @hash = nil
@mutex = Mutex.new
uri = args.first
if uri
@value = uri.to_s
Expand Down Expand Up @@ -665,12 +666,14 @@ def dup
# @private
def freeze
unless frozen?
# Create derived components
authority; userinfo; user; password; host; port
@value = value.freeze
@object = object.freeze
@hash = hash.freeze
super
@mutex.synchronize do
# Create derived components
authority; userinfo; user; password; host; port
@value = value.freeze
@object = object.freeze
@hash = hash.freeze
super
end
end
self
end
Expand Down

0 comments on commit 054805a

Please sign in to comment.