Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Varriount
f67b9bcc82 Revert "json.== handles nil now" 2014-07-24 18:06:30 -04:00

View file

@ -621,13 +621,9 @@ proc `%`*(elements: openArray[PJsonNode]): PJsonNode =
proc `==`* (a,b: PJsonNode): bool = proc `==`* (a,b: PJsonNode): bool =
## Check two nodes for equality ## Check two nodes for equality
if a.isNil: if a.kind != b.kind: false
if b.isNil: return true
return false
elif b.isNil or a.kind != b.kind:
return false
else: else:
return case a.kind case a.kind
of JString: of JString:
a.str == b.str a.str == b.str
of JInt: of JInt: