Skip to content

Commit d0e2935

Browse files
committed
Minor fix to match spec update.
1 parent 74a7014 commit d0e2935

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/json/ld/flatten.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def create_node_map(element, graph_map,
3636
raise "Expected hash or array to create_node_map, got #{element.inspect}"
3737
else
3838
graph = (graph_map[active_graph] ||= {})
39-
subject_node = graph[active_subject]
39+
subject_node = !active_subject.is_a?(Hash) && graph[active_subject]
4040

4141
# Transform BNode types
4242
if element.has_key?('@type')

spec/api_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
end
4545

4646
context "Test Files" do
47-
%w(oj json_gem ok_json yajl).map(&:to_sym).each do |adapter|
47+
%i(oj json_gem ok_json yajl).each do |adapter|
4848
context "with MultiJson adapter #{adapter.inspect}" do
4949
Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), 'test-files/*-input.*'))) do |filename|
5050
test = File.basename(filename).sub(/-input\..*$/, '')

0 commit comments

Comments
 (0)