diff options
Diffstat (limited to 'lib/ipaddress.rb')
-rw-r--r-- | lib/ipaddress.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ipaddress.rb b/lib/ipaddress.rb index 4033c3a..8b22431 100644 --- a/lib/ipaddress.rb +++ b/lib/ipaddress.rb @@ -67,7 +67,7 @@ module IPAddress # #-> "10.1.1.1" # def self.ntoa(uint) - unless(uint.is_a? Numeric and uint <= 0xffffffff) + unless(uint.is_a? Numeric and uint <= 0xffffffff and uint >= 0) raise(::ArgumentError, "not a long integer: #{uint.inspect}") end ret = [] |