summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark J. Titorenko <nospam-github.com@titorenko.net>2014-01-02 02:22:58 -0800
committerMark J. Titorenko <nospam-github.com@titorenko.net>2014-01-02 02:22:58 -0800
commit5918a27e2192eb73f1da98080fabe3627e2a1ef8 (patch)
treefd563578e510a61a862a617f73f861754e200a03
parent31a488f9f2a3495fd3f170e8c66ae5991d2daf79 (diff)
parentcdc902b3f20d09eb382a35b6300bb5cec7d41ce5 (diff)
downloadnet-dhcp-ruby-5918a27e2192eb73f1da98080fabe3627e2a1ef8.tar.gz
Merge pull request #6 from presto53/fix_raise
fix raise calling
-rw-r--r--lib/net/dhcp/core.rb4
-rw-r--r--lib/net/dhcp/options.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/dhcp/core.rb b/lib/net/dhcp/core.rb
index b0266f9..ca5506a 100644
--- a/lib/net/dhcp/core.rb
+++ b/lib/net/dhcp/core.rb
@@ -108,7 +108,7 @@ module DHCP
# message operation and options. We need at least an operation and a
# MessageTypeOption to create a DHCP message!!
if (([:op, :options] & params.keys).size != 2)
- raise ArgumentError('you need to specify at least values for :op and :options')
+ raise ArgumentError, 'you need to specify at least values for :op and :options'
end
self.op = params[:op]
@@ -119,7 +119,7 @@ module DHCP
next unless opt.class == MessageTypeOption
found = true
end
- raise ArgumentError(':options must include a MessageTypeOption') unless found
+ raise ArgumentError, ':options must include a MessageTypeOption' unless found
#hardware type and length of the hardware address
self.htype = params.fetch(:htype, $DHCP_HTYPE_ETHERNET)
diff --git a/lib/net/dhcp/options.rb b/lib/net/dhcp/options.rb
index d43481d..de47329 100644
--- a/lib/net/dhcp/options.rb
+++ b/lib/net/dhcp/options.rb
@@ -33,7 +33,7 @@ module DHCP
def initialize(params = {})
# We need a type, and a payload
if (([:type, :payload] & params.keys).size != 2)
- raise ArgumentError('you need to specify values for :type and :payload')
+ raise ArgumentError, 'you need to specify values for :type and :payload'
end
self.type = params[:type]