Module:IP: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
add input validation for overlapsSubnet
(Undid revision 731014195 by Johnuniq (talk) this breaks equality testing, as __eq needs to use the same function object, not just an equivalent anonymous function)
(add input validation for overlapsSubnet)
Line 602:
function obj:overlapsSubnet(subnet)
checkSelf(self, 'overlapsSubnet')
local tp = type(subnet)
if tp == 'string' then
subnet = makeSubnet(subnet)
elseif tp == 'table' then
validateSubnet('overlapsSubnet', 1, subnet)
else
checkTypeMulti('overlapsSubnet', 1, subnet, {'string', 'table'})
end
if self:getVersion() == subnet:getVersion() then
return (
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu