summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-18 07:03:16 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-18 07:03:16 +0000
commit4388d98671c7b798500fc622eb7ee903462989ab (patch)
treeeed5f8b6335a0b8ac1350b736130f6962688363a /lib
parent61bb4b389e133a73b24c54b1363a950f9eb87174 (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_0_0@49639 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 788806b470..1f38cd1070 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -1641,10 +1641,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}
@@ -1657,7 +1657,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
}