Skip to content

Commit 748ba28

Browse files
committed
Deal with frozen string issue.
1 parent 452b579 commit 748ba28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/json/ld/context.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def parse(local_context, remote_contexts = [])
333333
# 3.2.1) Set context to the result of resolving value against the base IRI which is established as specified in section 5.1 Establishing a Base URI of [RFC3986]. Only the basic algorithm in section 5.2 of [RFC3986] is used; neither Syntax-Based Normalization nor Scheme-Based Normalization are performed. Characters additionally allowed in IRI references are treated in the same way that unreserved characters are treated in URI references, per section 6.5 of [RFC3987].
334334
context = RDF::URI(result.context_base || result.base).join(context)
335335
context_canon = RDF::URI(context).canonicalize
336-
context_canon.scheme = 'http' if context_canon.scheme == 'https'
336+
context_canon.dup.scheme = 'http'.dup if context_canon.scheme == 'https'
337337

338338
raise JsonLdError::RecursiveContextInclusion, "#{context}" if remote_contexts.include?(context.to_s)
339339
remote_contexts << context.to_s

0 commit comments

Comments
 (0)