diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 04:59:24 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 04:59:24 +0000 |
commit | b7528b5edb1f9148ea00ebb6151720e5943b3f0b (patch) | |
tree | 4caf55c53adb188170240f54b924892fbc5f9814 /lib/rdoc/ri/driver.rb | |
parent | 97ac172d58d695305c39d555155318edb99f1ea7 (diff) | |
download | ruby-b7528b5edb1f9148ea00ebb6151720e5943b3f0b.tar.gz |
* lib/rdoc.rb: Import RDoc 3.7 release candidate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/ri/driver.rb')
-rw-r--r-- | lib/rdoc/ri/driver.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb index 46aeaeebc2..2c6f2f48e2 100644 --- a/lib/rdoc/ri/driver.rb +++ b/lib/rdoc/ri/driver.rb @@ -456,9 +456,13 @@ Options may also be set in the 'RI' environment variable. out << RDoc::Markup::Heading.new(1, "#{name}:") out << RDoc::Markup::BlankLine.new - out.push(*methods.map do |method| - RDoc::Markup::Verbatim.new method - end) + if @use_stdout and !@interactive + out.push(*methods.map do |method| + RDoc::Markup::Verbatim.new method + end) + else + out << RDoc::Markup::IndentedParagraph.new(2, methods.join(', ')) + end out << RDoc::Markup::BlankLine.new end @@ -532,8 +536,9 @@ Options may also be set in the 'RI' environment variable. klass_name = method ? name : klass if name !~ /#|\./ then - completions = klasses.grep(/^#{klass_name}[^:]*$/) - completions.concat klasses.grep(/^#{name}[^:]*$/) if name =~ /::$/ + completions = klasses.grep(/^#{Regexp.escape klass_name}[^:]*$/) + completions.concat klasses.grep(/^#{Regexp.escape name}[^:]*$/) if + name =~ /::$/ completions << klass if classes.key? klass # to complete a method name elsif selector then |