From 94c5f5a77ca629f8288230972eee6257c9626ce5 Mon Sep 17 00:00:00 2001 From: hsbt Date: Fri, 28 Aug 2015 07:05:17 +0000 Subject: [PATCH] * 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 --- ChangeLog | 6 ++++++ lib/rdoc/generator/template/json_index/js/searcher.js | 4 ++-- lib/rdoc/rdoc.rb | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e935a461464b9..9e81b8d492569f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Aug 28 16:05:09 2015 SHIBATA Hiroshi + + * lib/rdoc/*: Update rdoc master(cfffed5) + https://github.com/rdoc/rdoc/pull/337 + https://github.com/rdoc/rdoc/pull/367 + Fri Aug 28 10:16:20 2015 Koichi Sasada * vm.c (hook_before_rewind): prevent kicking :return event while diff --git a/lib/rdoc/generator/template/json_index/js/searcher.js b/lib/rdoc/generator/template/json_index/js/searcher.js index f854b541d03ee8..0419f2a11744e0 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 4d45d479783454..f4bb58e14bd70d 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -353,7 +353,11 @@ def parse_file filename 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