Skip to content

Commit

Permalink
Fixed minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemonk committed Jul 9, 2009
1 parent 0431e88 commit 3bf3350
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/net/dns/header.rb
Expand Up @@ -100,7 +100,7 @@ class Header
# problem with the name server.
# * 3 Name Error - Meaningful only for
# responses from an authoritative name
# server, this code signifies that the
# server, this code means that the
# domain name referenced in the query does
# not exist.
# * 4 Not Implemented - The name server does
Expand Down
4 changes: 2 additions & 2 deletions lib/net/dns/packet.rb
Expand Up @@ -468,7 +468,7 @@ def size
data.size
end

# Chacks whether a query has returned a NXDOMAIN error,
# Checks whether a query has returned a NXDOMAIN error,
# meaning the domain name queried doesn't exists.
#
# %w[a.com google.com ibm.com d.com].each do |domain|
Expand All @@ -479,7 +479,7 @@ def size
# #=> d.com doesn't exist
#
def nxdomain?
header.rCode == Net::DNS::Header::NAME
header.rCode.code == Net::DNS::Header::RCode::NAME
end

private
Expand Down
4 changes: 2 additions & 2 deletions lib/net/dns/rr/mx.rb
Expand Up @@ -46,8 +46,8 @@ def get_inspect

def subclass_new_from_hash(args)
if args.has_key? :preference and args.has_key? :exchange
@preference = args[0][:preference].to_i
@exchange = args[0][:exchange]
@preference = args[:preference].to_i
@exchange = args[:exchange]
else
raise RRArgumentError, ":preference and :exchange fields are mandatory but missing"
end
Expand Down

0 comments on commit 3bf3350

Please sign in to comment.