diff options
-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] |