@@ -87,7 +87,7 @@ class API
8787 # @yieldparam [API]
8888 # @raise [JsonLdError]
8989 def initialize ( input , context , options = { } , &block )
90- @options = { compactArrays : true , rename_bnodes : true } . merge ( options )
90+ @options = { compactArrays : true , rename_bnodes : true } . merge! ( options )
9191 @options [ :validate ] = true if @options [ :processingMode ] == "json-ld-1.0"
9292 @options [ :documentLoader ] ||= self . class . method ( :documentLoader )
9393 @namer = options [ :unique_bnodes ] ? BlankNodeUniqer . new : ( @options [ :rename_bnodes ] ? BlankNodeNamer . new ( "b" ) : BlankNodeMapper . new )
@@ -98,7 +98,7 @@ def initialize(input, context, options = {}, &block)
9898 @value = case input
9999 when Array , Hash then input . dup
100100 when IO , StringIO
101- @options = { base : input . base_uri } . merge ( @options ) if input . respond_to? ( :base_uri )
101+ @options = { base : input . base_uri } . merge! ( @options ) if input . respond_to? ( :base_uri )
102102
103103 # if input impelements #links, attempt to get a contextUrl from that link
104104 content_type = input . respond_to? ( :content_type ) ? input . content_type : "application/json"
@@ -113,7 +113,7 @@ def initialize(input, context, options = {}, &block)
113113 when String
114114 remote_doc = @options [ :documentLoader ] . call ( input , @options )
115115
116- @options = { base : remote_doc . documentUrl } . merge ( @options )
116+ @options = { base : remote_doc . documentUrl } . merge! ( @options )
117117 context_ref = remote_doc . contextUrl
118118
119119 case remote_doc . document
@@ -322,7 +322,7 @@ def self.frame(input, frame, options = {})
322322 requireAll : true ,
323323 omitDefault : false ,
324324 documentLoader : method ( :documentLoader )
325- } . merge ( options )
325+ } . merge! ( options )
326326
327327 framing_state = {
328328 graphs : { '@default' => { } , '@merged' => { } } ,
@@ -471,7 +471,7 @@ def self.toRdf(input, options = {}, &block)
471471 # @return [Object, Hash]
472472 # If a block is given, the result of evaluating the block is returned, otherwise, the expanded JSON-LD document
473473 def self . fromRdf ( input , options = { } , &block )
474- options = { useNativeTypes : false } . merge ( options )
474+ options = { useNativeTypes : false } . merge! ( options )
475475 result = nil
476476
477477 API . new ( nil , nil , options ) do |api |
0 commit comments