diff options
Diffstat (limited to 'lib/resolv.rb')
-rw-r--r-- | lib/resolv.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb index 3b7ab2a394..a801cf6ff4 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -1185,7 +1185,7 @@ class Resolv end def ==(other) - return @downcase == other.downcase + return self.class == other.class && @downcase == other.downcase end def eql?(other) @@ -1221,6 +1221,14 @@ class Resolv end def initialize(labels, absolute=true) # :nodoc: + labels = labels.map {|label| + case label + when String then Label::Str.new(label) + when Label::Str then label + else + raise ArgumentError, "unexpected label: #{label.inspect}" + end + } @labels = labels @absolute = absolute end |