diff --git a/lib/json-schema/schema.rb b/lib/json-schema/schema.rb index 51f4593e..29c6f003 100644 --- a/lib/json-schema/schema.rb +++ b/lib/json-schema/schema.rb @@ -10,7 +10,7 @@ def initialize(schema,uri,parent_validator=nil) @uri = uri # If there is an ID on this schema, use it to generate the URI - if @schema['id'] + if @schema['id'] && @schema['id'].kind_of?(String) temp_uri = URI.parse(@schema['id']) if temp_uri.relative? uri = uri.merge(@schema['id'])