summaryrefslogtreecommitdiff
path: root/lib/ipaddress/ipv4.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ipaddress/ipv4.rb')
-rw-r--r--lib/ipaddress/ipv4.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ipaddress/ipv4.rb b/lib/ipaddress/ipv4.rb
index 7d8e0d3..cbccac0 100644
--- a/lib/ipaddress/ipv4.rb
+++ b/lib/ipaddress/ipv4.rb
@@ -61,6 +61,7 @@ module IPAddress;
# IPAddress::IPv4.new "10.0.0.1/255.0.0.0"
#
def initialize(str)
+ raise ArgumentError, "Nil IP" unless str
ip, netmask = str.split("/")
# Check the ip and remove white space