diff options
author | Pavel Novitskiy <altusensix@gmail.com> | 2013-12-25 22:53:55 +0400 |
---|---|---|
committer | Pavel Novitskiy <altusensix@gmail.com> | 2013-12-25 22:53:55 +0400 |
commit | cdc902b3f20d09eb382a35b6300bb5cec7d41ce5 (patch) | |
tree | fd563578e510a61a862a617f73f861754e200a03 | |
parent | 31a488f9f2a3495fd3f170e8c66ae5991d2daf79 (diff) | |
download | net-dhcp-ruby-cdc902b3f20d09eb382a35b6300bb5cec7d41ce5.tar.gz |
fix raise calling
-rw-r--r-- | lib/net/dhcp/core.rb | 4 | ||||
-rw-r--r-- | lib/net/dhcp/options.rb | 2 |
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] |