diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-05 01:41:25 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-05 01:41:25 +0000 |
commit | d42d6e690e3f553b971322eae783ac6b0d4d9692 (patch) | |
tree | 2004bf4517ee7b81466c300cf30092e62e65467e /lib/rdoc/context.rb | |
parent | 670c6e8ce9d4a12bb4832e10fab27365398649bf (diff) |
* 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/context.rb')
-rw-r--r-- | lib/rdoc/context.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/rdoc/context.rb b/lib/rdoc/context.rb index 892a43e118..5eb86ddc92 100644 --- a/lib/rdoc/context.rb +++ b/lib/rdoc/context.rb @@ -164,6 +164,8 @@ class RDoc::Context < RDoc::CodeObject # Contexts are sorted by full_name def <=>(other) + return nil unless RDoc::CodeObject === other + full_name <=> other.full_name end @@ -321,10 +323,11 @@ class RDoc::Context < RDoc::CodeObject end # fix up superclass - superclass = nil if full_name == 'BasicObject' - superclass = nil if full_name == 'Object' and defined?(::BasicObject) - superclass = '::BasicObject' if - defined?(::BasicObject) and full_name == 'Object' + if full_name == 'BasicObject' then + superclass = nil + elsif full_name == 'Object' then + superclass = defined?(::BasicObject) ? '::BasicObject' : nil + end # find the superclass full name if superclass then |