From 2c1db6631d6a953a97cbe811dd2661c14dac8a93 Mon Sep 17 00:00:00 2001 From: Jesse Stuart Date: Wed, 30 Jan 2013 13:56:04 -0500 Subject: [PATCH] Fix: Don't attempt to parse URI from non-string --- lib/json-schema/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'])