summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-17 09:57:39 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-17 09:57:39 +0000
commit00088b97ec59766147d7357c780f0f1cf500dfef (patch)
treea4e0faf5dde3737477232cc35ed7a2abf44a6c8e /lib
parenteef3f0d94cd884a27ed2b9523240370f5e8026f1 (diff)
merge revision(s) 49620: [Backport #10857]
* lib/resolv.rb (Resolv::DNS::Resource#==, #hash): elements returned by Kernel#instance_variables are Symbols now. [ruby-core:68128] [Bug #10857] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/resolv.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb
index 3b6e72acc2..7855c6eeb8 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -1666,10 +1666,10 @@ class Resolv
return false unless self.class == other.class
s_ivars = self.instance_variables
s_ivars.sort!
- s_ivars.delete "@ttl"
+ s_ivars.delete :@ttl
o_ivars = other.instance_variables
o_ivars.sort!
- o_ivars.delete "@ttl"
+ o_ivars.delete :@ttl
return s_ivars == o_ivars &&
s_ivars.collect {|name| self.instance_variable_get name} ==
o_ivars.collect {|name| other.instance_variable_get name}
@@ -1682,7 +1682,7 @@ class Resolv
def hash # :nodoc:
h = 0
vars = self.instance_variables
- vars.delete "@ttl"
+ vars.delete :@ttl
vars.each {|name|
h ^= self.instance_variable_get(name).hash
}