about summary refs log tree commit homepage
path: root/lib/msgthr/container.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msgthr/container.rb')
-rw-r--r--lib/msgthr/container.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/msgthr/container.rb b/lib/msgthr/container.rb
index fbff719..256033b 100644
--- a/lib/msgthr/container.rb
+++ b/lib/msgthr/container.rb
@@ -64,9 +64,10 @@ class Msgthr::Container
   end
 
   def has_descendent(child) # :nodoc:
-    seen = Hash.new(0)
+    seen = {}
     while child
-      return true if self == child || (seen[child] += 1) != 0
+      return true if self == child || seen[child]
+      seen[child] = true
       child = child.parent
     end
     false