From d781caaf313b8649948c107bba277e5ad7307314 Mon Sep 17 00:00:00 2001 From: eregon Date: Sun, 5 Jan 2014 11:14:59 +0000 Subject: * compar.c (cmp_equal): remove error hiding in Comparable#==. Comparable#== no longer rescues exceptions silently. This was the cause of quite a couple bugs. See #7688. [EXPERIMENTAL] * test/ruby/test_comparable.rb: adapt assertion to match new behavior. * lib/rdoc/method_attr.rb: fix bugs discovered by this change. * test/rdoc/test_rdoc_normal_class.rb: fix bugs in tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/method_attr.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rdoc') diff --git a/lib/rdoc/method_attr.rb b/lib/rdoc/method_attr.rb index 8bde102640..00c9318852 100644 --- a/lib/rdoc/method_attr.rb +++ b/lib/rdoc/method_attr.rb @@ -115,7 +115,7 @@ class RDoc::MethodAttr < RDoc::CodeObject end def == other # :nodoc: - super or self.class == other.class and full_name == other.full_name + equal?(other) or self.class == other.class and full_name == other.full_name end ## @@ -181,8 +181,8 @@ class RDoc::MethodAttr < RDoc::CodeObject parent != kernel && !searched.include?(kernel) searched.each do |ancestor| - next if parent == ancestor next if String === ancestor + next if parent == ancestor other = ancestor.find_method_named('#' << name) || ancestor.find_attribute_named(name) -- cgit v1.2.3