From ec9a9af3754671cd066eb9827c4207b36a5f9dba Mon Sep 17 00:00:00 2001 From: Ulysse Buonomo Date: Sun, 27 Jun 2021 00:33:34 +0200 Subject: [ruby/rdoc] Fix chained inclusion ancestors_of Fixes #814 Signed-off-by: Ulysse Buonomo https://github.com/ruby/rdoc/commit/b45f747216 --- lib/rdoc/ri/driver.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/rdoc') diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb index 0408cbb0aa..7549a39203 100644 --- a/lib/rdoc/ri/driver.rb +++ b/lib/rdoc/ri/driver.rb @@ -616,11 +616,11 @@ or the PAGER environment variable. stores = classes[current] - break unless stores and not stores.empty? + next unless stores and not stores.empty? - klasses = stores.map do |store| - store.ancestors[current] - end.flatten.uniq + klasses = stores.flat_map do |store| + store.ancestors[current] || [] + end.uniq klasses = klasses - seen -- cgit v1.2.3