aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-28 07:05:17 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-28 07:05:17 +0000
commit0f3b943fae5721f1aafb6f06bcd34578d752bdcb (patch)
tree84cc0aadf5e682e2a50c1f026d5a15aaf2a38c31 /lib/rdoc
parent1a8c38e2aac1457afedc026d5a2c1732a65e0aae (diff)
downloadruby-0f3b943fae5721f1aafb6f06bcd34578d752bdcb.tar.gz
* lib/rdoc/*: Update rdoc master(cfffed5)
https://github.com/rdoc/rdoc/pull/337 https://github.com/rdoc/rdoc/pull/367 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/generator/template/json_index/js/searcher.js4
-rw-r--r--lib/rdoc/rdoc.rb6
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/rdoc/generator/template/json_index/js/searcher.js b/lib/rdoc/generator/template/json_index/js/searcher.js
index f854b541d0..0419f2a117 100644
--- a/lib/rdoc/generator/template/json_index/js/searcher.js
+++ b/lib/rdoc/generator/template/json_index/js/searcher.js
@@ -52,13 +52,13 @@ Searcher.prototype = new function() {
/* ----- Utilities ------ */
function splitQuery(query) {
return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) {
- return string.match(/\S/)
+ return string.match(/\S/);
});
}
function buildRegexps(queries) {
return jQuery.map(queries, function(query) {
- return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i')
+ return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i');
});
}
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index 4d45d47978..f4bb58e14b 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -353,7 +353,11 @@ option)
return unless content
filename_path = Pathname(filename).expand_path
- relative_path = filename_path.relative_path_from @options.root
+ begin
+ relative_path = filename_path.relative_path_from @options.root
+ rescue ArgumentError
+ relative_path = filename_path
+ end
if @options.page_dir and
relative_path.to_s.start_with? @options.page_dir.to_s then