Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/threading_test_tools.rb
Instance Attribute Summary collapse
-
#data_equal_ignore ⇒ Object
Returns the value of attribute data_equal_ignore.
Instance Method Summary collapse
Instance Attribute Details
#data_equal_ignore ⇒ Object
Returns the value of attribute data_equal_ignore.
218 219 220 |
# File 'lib/threading_test_tools.rb', line 218 def data_equal_ignore @data_equal_ignore end |
Instance Method Details
#data_equal?(obj, message = nil, recursive_check = {}) ⇒ Boolean
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/threading_test_tools.rb', line 220 def data_equal?(obj, = nil, recursive_check = {}) return true if data_equal_ignore if not self.class.data_equal?(obj.class, , recursive_check) !.nil? and .unshift '.class' return false end return recursive_check[[self, obj]] if recursive_check.has_key?([self, obj]) recursive_check[[self, obj]] = true self.instance_variables.each do |name| if not self.instance_variable_get(name).data_equal?(obj.instance_variable_get(name), , recursive_check) !.nil? and .unshift ".#{name}" recursive_check[[self, obj]] = false return false end end true end |