lib/json/add/core.rb in json-1.1.3 vs lib/json/add/core.rb in json-1.1.4
- old
+ new
@@ -94,10 +94,10 @@
new(*object['v'])
end
def to_json(*args)
klass = self.class.name
- klass.empty? and raise JSON::JSONError, "Only named structs are supported!"
+ klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!"
{
'json_class' => klass,
'v' => values,
}.to_json(*args)
end