From b6ef9b00ad41bbc7e75f0f7245c0a7226152c6da Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 8 Jan 2012 01:38:48 -0500 Subject: [PATCH] fix schema to not choke when '$ref' is specifying what the '$ref' property actually is, rather than invoking it, and is therefore not a string. this applies to the schema JsonSchema, specified in the document for the discovery service itself --- lib/google/api_client/discovery/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/google/api_client/discovery/schema.rb b/lib/google/api_client/discovery/schema.rb index f3499ebdc..2b4d59833 100644 --- a/lib/google/api_client/discovery/schema.rb +++ b/lib/google/api_client/discovery/schema.rb @@ -47,7 +47,7 @@ module Google # and excess object creation, but this hopefully shouldn't be an # issue since it should only be called only once per schema per # process. - if data.kind_of?(Hash) && data['$ref'] + if data.kind_of?(Hash) && data['$ref'].is_a?(String) reference = data['$ref'] reference = '#' + reference if reference[0..0] != '#' data.merge({