aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/method_attr.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-05 01:41:25 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-05 01:41:25 +0000
commitd42d6e690e3f553b971322eae783ac6b0d4d9692 (patch)
tree2004bf4517ee7b81466c300cf30092e62e65467e /lib/rdoc/method_attr.rb
parent670c6e8ce9d4a12bb4832e10fab27365398649bf (diff)
downloadruby-d42d6e690e3f553b971322eae783ac6b0d4d9692.tar.gz
* lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/method_attr.rb')
-rw-r--r--lib/rdoc/method_attr.rb3
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