From 86ca2a866c105d338f1e42f562852756a9ef9a67 Mon Sep 17 00:00:00 2001 From: Marcel Otto Date: Tue, 26 Mar 2019 21:53:57 +0100 Subject: [PATCH] Fix RDF.PrefixMap.normalize/1 --- lib/rdf/prefix_map.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rdf/prefix_map.ex b/lib/rdf/prefix_map.ex index ad1d30d..c8b7f2e 100644 --- a/lib/rdf/prefix_map.ex +++ b/lib/rdf/prefix_map.ex @@ -34,12 +34,12 @@ defmodule RDF.PrefixMap do defp normalize({prefix, %IRI{} = namespace}) when is_atom(prefix), do: {prefix, namespace} - defp normalize({prefix, namespace}) when is_atom(prefix), - do: normalize({prefix, IRI.new(namespace)}) - defp normalize({prefix, namespace}) when is_binary(prefix), do: normalize({String.to_atom(prefix), namespace}) + defp normalize({prefix, namespace}) when is_binary(namespace), + do: normalize({prefix, IRI.new(namespace)}) + defp normalize({prefix, _}), do: raise("Invalid prefix on PrefixMap: #{inspect(prefix)}}")