Skip to content

Commit a66822d

Browse files
committed
When generating a Ruby version of a context, order terms.
1 parent 55b95b5 commit a66822d

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
@@ -1204,7 +1204,7 @@ def to_rb
12041204
defn << "vocab: #{self.vocab.to_s.inspect}" if self.vocab
12051205
term_defs = term_definitions.map do |term, td|
12061206
" " + term.inspect + " => " + td.to_rb
1207-
end
1207+
end.sort
12081208
defn << "term_definitions: {\n#{term_defs.join(",\n") }\n }" unless term_defs.empty?
12091209
%(# -*- encoding: utf-8 -*-
12101210
# frozen_string_literal: true

0 commit comments

Comments
 (0)