Fix tests broken in 7296c6d
7296c6d doesn't do any nil checking, so it segfaults on `==` on `Regex`
This commit is contained in:
parent
b556bd9abf
commit
ab6e83ad41
1 changed files with 2 additions and 1 deletions
|
|
@ -175,7 +175,8 @@ proc `$`*(pattern: RegexMatch): string =
|
|||
|
||||
proc `==`*(a, b: Regex): bool =
|
||||
# name-to-number table is generated at init time, doesn't need to be checked
|
||||
return a.pattern == b.pattern and
|
||||
return not a.isNil and not b.isNil and
|
||||
a.pattern == b.pattern and
|
||||
a.pcreObj == b.pcreObj and
|
||||
a.pcreExtra == b.pcreExtra
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue