Skip to content

Commit a60b66d

Browse files
committed
slight change in vocab_map behaviour
1 parent 33e9459 commit a60b66d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/rdf/vocabulary.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def vocab_map
9393
# Create an initial duplicate of RDF::VOCABS. We want to
9494
# ensure the hash itself is modifiable but the values are
9595
# frozen.
96-
(@vocab_map ||= {}).merge RDF::VOCABS.transform_values(&:freeze)
96+
@vocab_map ||= RDF::VOCABS.transform_values(&:freeze)
9797
end
9898

9999
##
@@ -132,7 +132,7 @@ def register(prefix, vocab, **params)
132132
params[:class_name] ||= prefix.to_s.upcase
133133

134134
# now freeze and assign; note @vocab_map may not exist yet
135-
(@vocab_map ||= {})[prefix.to_s.to_sym] = params.freeze
135+
vocab_map[prefix.to_s.to_sym] = params.freeze
136136
end
137137

138138
##

0 commit comments

Comments
 (0)