Skip to content

Commit

Permalink
Fix: Don't attempt to parse URI from non-string
Browse files Browse the repository at this point in the history
  • Loading branch information
jvatic committed Jan 30, 2013
1 parent 0017da1 commit 2c1db66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/json-schema/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit 2c1db66

Please sign in to comment.