summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-30 01:39:03 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-30 01:39:03 +0000
commit696ebcd8cafece7c0ed6407af9679699a16a5c5a (patch)
treee06e2d541959569dc20256053a21652671dabb70 /lib/rdoc
parente553663cbda58188d085a0e6e5a71d52d3d95c5a (diff)
* lib/rdoc/ri/driver.rb: Relaxed matching for pages to be more
user-friendly. * test/rdoc/test_rdoc_ri_driver.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/ri/driver.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index 4beda55881..4f5e13034e 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -842,10 +842,12 @@ The ri pager can be set with the 'RI_PAGER' environment variable or the
unless pages.include? page_name then
found_names = pages.select do |n|
- n =~ /^#{Regexp.escape page_name}\.[^.]+$/
+ n =~ /#{Regexp.escape page_name}\.[^.]+$/
end
- if found_names.length > 1 then
+ if found_names.length.zero? then
+ return display_page_list store, pages
+ elsif found_names.length > 1 then
return display_page_list store, found_names, page_name
end