diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb index edd2a703e7..3cfc34d243 100644 --- a/lib/rdoc/ri/driver.rb +++ b/lib/rdoc/ri/driver.rb @@ -1146,17 +1146,6 @@ def interactive exit end - ## - # Is +file+ in ENV['PATH']? - - def in_path? file - return true if file =~ %r%\A/% and File.exist? file - - ENV['PATH'].split(File::PATH_SEPARATOR).any? do |path| - File.exist? File.join(path, file) - end - end - ## # Lists classes known to ri starting with +names+. If +names+ is empty all # known classes are shown. @@ -1526,10 +1515,6 @@ def setup_pager pagers.compact.uniq.each do |pager| next unless pager - pager_cmd = pager.split(' ').first - - next unless in_path? pager_cmd - if jruby then case io = find_pager_jruby(pager) when nil then break diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb index 5f3468c368..c23fe63130 100644 --- a/test/rdoc/test_rdoc_ri_driver.rb +++ b/test/rdoc/test_rdoc_ri_driver.rb @@ -1091,23 +1091,6 @@ def tty.tty?() true; end assert_instance_of @RM::ToBs, driver.formatter(StringIO.new) end - def test_in_path_eh - path = ENV['PATH'] - - test_path = File.expand_path '..', __FILE__ - - temp_dir do |dir| - nonexistent = File.join dir, 'nonexistent' - refute @driver.in_path?(nonexistent) - - ENV['PATH'] = test_path - - assert @driver.in_path?(File.basename(__FILE__)) - end - ensure - ENV['PATH'] = path - end - def test_method_type assert_equal :both, @driver.method_type(nil) assert_equal :both, @driver.method_type('.') @@ -1246,7 +1229,7 @@ def test_load_method_missing assert_equal '(unknown)#inherit', method.full_name end - def _test_page # this test doesn't do anything anymore :( + def test_page @driver.use_stdout = false with_dummy_pager do @@ -1260,9 +1243,7 @@ def _test_page # this test doesn't do anything anymore :( refute @driver.paging? end - # this test is too fragile. Perhaps using Process.spawn will make this - # reliable - def _test_page_in_presence_of_child_status + def test_page_in_presence_of_child_status @driver.use_stdout = false with_dummy_pager do @@ -1425,7 +1406,7 @@ def test_parse_name_special end end - def _test_setup_pager # this test doesn't do anything anymore :( + def test_setup_pager # this test doesn't do anything anymore :( @driver.use_stdout = false pager = with_dummy_pager do @driver.setup_pager end