Possibly misleading error message
hvds opened this issue · comments
In XS.xs:_validate_int()
I see:
if (len == 0 || ptr == 0) croak("Parameter must be a positive integer");
if (ptr[0] == '-' && negok) {
isneg = 1; ptr++; len--; /* Read negative sign */
It looks like the message should be negok ? "Parameter must be an integer" : "Parameter must be a positive integer"
.
It looks like that was fixed in February in github, with the same behavior. Those changes also tried to consistently use "non-negative" rather than "positive" unless zero is not allowed.