diff options
Diffstat (limited to 'lib/rdoc/method_attr.rb')
-rw-r--r-- | lib/rdoc/method_attr.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rdoc/method_attr.rb b/lib/rdoc/method_attr.rb index 00c9318852..9af64539c3 100644 --- a/lib/rdoc/method_attr.rb +++ b/lib/rdoc/method_attr.rb @@ -110,6 +110,9 @@ class RDoc::MethodAttr < RDoc::CodeObject # Order by #singleton then #name def <=>(other) + return unless other.respond_to?(:singleton) && + other.respond_to?(:name) + [ @singleton ? 0 : 1, name] <=> [other.singleton ? 0 : 1, other.name] end |