Stan Lo
cbc40bb130
Sync rdoc
2024-08-05 08:27:45 +08:00
Nobuyoshi Nakada
cc393b4f80
[ruby/rdoc] Get rid of `Kernel#open`
...
https://github.com/ruby/rdoc/commit/dc56f6d0bd
2023-11-30 15:06:51 +00:00
Sven Riedel
e0901f46b7
[ruby/rdoc] Add `--no-skipping-tests` option
...
https://github.com/ruby/rdoc/commit/33925f885f
2022-11-28 04:36:29 +00:00
Nobuyoshi Nakada
3b3fb73d61
[ruby/rdoc] Dump plain objects as `RDoc::Options`
...
So that the generated `.rdoc_options` file is loadable.
https://github.com/ruby/rdoc/commit/6cf6e1647b
2022-02-12 16:15:08 +09:00
aycabta
cf2faf2e33
[ruby/rdoc] Move RDoc::RDoc#load_options to RDoc::RDoc.load_options
...
https://github.com/ruby/rdoc/commit/ac85e01756
2021-09-02 00:32:13 +09:00
aycabta
c9ab8fe2b1
The test for command injection on Unix platforms should be omitted on Windows
2021-05-31 23:34:40 +09:00
Nobuyoshi Nakada
59b327aa58
[ruby/rdoc] Drop support for Ruby 2.4
...
https://github.com/ruby/rdoc/commit/f480b970cc
2021-05-21 15:53:34 +09:00
Nobuyoshi Nakada
10e63f3f56
[ruby/rdoc] Vertical-bar is disallowed in path names on Windows
...
No risk of remote code execution, when the file cannot be created.
https://github.com/ruby/rdoc/runs/2565343916?check_suite_focus=true#step:5:58
```
Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): Errno::EINVAL: Invalid argument @ utime_failed - | touch evil.txt && echo tags
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `utime'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `block in touch'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `each'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `touch'
D:/a/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:463:in `block (2 levels) in test_remove_unparseable_CVE_2021_31799'
460: temp_dir do
461: file_list = ['| touch evil.txt && echo tags']
462: file_list.each do |f|
=> 463: FileUtils.touch f
464: end
465:
466: assert_equal file_list, @rdoc.remove_unparseable(file_list)
```
https://github.com/ruby/rdoc/commit/a7df7dc8fa
2021-05-21 15:53:34 +09:00
Nobuyoshi Nakada
a298bdf860
[ruby/rdoc] Dir.children is 2.5+
...
RDoc seems still supporting outdated 2.4.
https://github.com/ruby/rdoc/runs/2565344070?check_suite_focus=true#step:5:64
```
Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): NoMethodError: undefined method `children' for Dir:Class
/home/runner/work/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:467:in `block in test_remove_unparseable_CVE_2021_31799'
464: end
465:
466: assert_equal file_list, @rdoc.remove_unparseable(file_list)
=> 467: assert_equal file_list, Dir.children('.')
468: end
469: end
470:
```
https://github.com/ruby/rdoc/commit/5a4a64dc0f
2021-05-21 15:53:34 +09:00
aycabta
b1c73f239f
[ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799
...
https://github.com/ruby/rdoc/commit/a7f5d6ab88
2021-05-21 13:42:24 +09:00
aycabta
61a29a41e1
[ruby/rdoc] Allow empty .rdoc_options
...
https://github.com/ruby/rdoc/commit/0c8cb25b50
2021-03-16 15:47:27 +09:00
aycabta
971a0cd246
[ruby/rdoc] Allow partial default values to be overridden with .rdoc_options
...
https://github.com/ruby/rdoc/commit/e14800891f
2021-03-16 15:47:27 +09:00
Nobuyoshi Nakada
e23f0f29da
[ruby/rdoc] update all files if any file is newer
...
Cross references need parse all files which define the subject
names. This commit makes `--force-update` option enforce to parse
all files if any file is newer than the previous parse, not only
updated files.
https://github.com/ruby/rdoc/commit/13e9a44896
2020-09-18 14:57:58 +09:00
Benoit Daloze
d7492a0be8
Revert changes to rdoc & rubygems regarding Tempfile.open(&block)
...
* They likely want to support older Ruby/tempfile versions
* Reverts part of e8c3872555
2020-08-29 12:49:20 +02:00
Benoit Daloze
e8c3872555
Simplify Tempfile.open calls with a block as they now unlink the file automatically
2020-08-29 12:23:23 +02:00
Yusuke Endoh
79a7fd9120
Revert "Revert "[ruby/rdoc] Use omit of test-unit instead of skip of minitest""
...
This reverts commit ca5812fe45
.
Now tool/lib/minitest provides "omit", so it should work.
2019-10-29 13:16:31 +09:00
Yusuke Endoh
ca5812fe45
Revert "[ruby/rdoc] Use omit of test-unit instead of skip of minitest"
...
This reverts commit b4da6fc1c2
.
`make test-all` uses minitest, which led to "undefined method `omit'"
2019-10-29 12:57:31 +09:00
aycabta
9525541d02
[ruby/rdoc] Use Dir.glob to convert short path of Dir.tmpdir to long path
...
https://github.com/ruby/rdoc/commit/ba16e44572
2019-10-29 12:34:44 +09:00
aycabta
b4da6fc1c2
[ruby/rdoc] Use omit of test-unit instead of skip of minitest
...
https://github.com/ruby/rdoc/commit/1c5bf2ae1d
2019-10-29 12:34:44 +09:00
Nobuyoshi Nakada
17ee01e3f6
Removed an unused assignment
2019-10-16 15:16:54 +09:00
aycabta
a458317b91
Use assert_raise and skip for test/unit
2019-08-16 06:45:36 +09:00
Hiroshi SHIBATA
daf5ce3ba1
Use omit instead of skip for test-unit.
2019-08-16 06:07:11 +09:00
Nobuyoshi Nakada
5555e3ef57
Renamed minitest_helper.rb as helper.rb
2019-08-16 06:07:11 +09:00
Hiroshi SHIBATA
2990c2cc3e
Use capture_output instead of capture_io.
...
It's preparation for migrating test-unit on upstream.
2019-08-11 06:14:01 +09:00
mame
925a722ae2
test/rdoc: skip some tests when euid is root
...
root user can access a file whose permission is 0000.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-26 06:01:18 +00:00
aycabta
18911e99d2
Merge RDoc 6.1.0.beta3 from upstream
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-08 17:39:52 +00:00
mame
e0dd7b4d3a
test/rdoc/test_rdoc_rdoc.rb: add dummy finish
...
RDoc::Options#@exclude is initialized as an empty array.
Then, #finish converts it to a regexp or nil and reassign it to @exclude.
Some methods of RDoc assumes that #finish has been already called.
So, this change forces to assign nil to @exclude.
This type confusion was found during work for removal of `Object#=~`.
[Feature #15231 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 05:46:02 +00:00
hsbt
98c7058bf7
Merge RDoc 6.0.3 from upstream.
...
It fixed the several bugs that was found after RDoc 6 releasing.
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-26 05:56:26 +00:00
mame
b496220a1f
skip some tests so that no failure occurs in root privilege
...
Some tests had failed on `sudo make test-all`, mainly because root can
access any files regardless of permission. This change adds `skip`
guards into such tests.
Note that almost all tests in which `skip` guards is added, already have
"windows" guard. This is because there is no support to avoid read
access by owner on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-10 10:39:09 +00:00
hsbt
5551871086
Merge rdoc-6.0.0.beta4 from upstream.
...
It version applied `frozen_string_literal: true`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-27 10:45:24 +00:00
hsbt
cdc527db34
* lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0
...
Release note: b825775647/History.rdoc (500--2016-11-05)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 09:18:10 +00:00
hsbt
ba6ae341ba
* lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta2
...
Fixed ri parse defect with left-hand matched classes.
https://github.com/rdoc/rdoc/pull/420
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-07 22:23:38 +00:00
hsbt
23863ff75d
* lib/rdoc/*, test/rdoc/*: Update rdoc/rdoc master(f191513)
...
https://github.com/rdoc/rdoc/blob/master/History.rdoc#423--2016--
https://github.com/rdoc/rdoc/blob/master/History.rdoc#422--2016-02-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-05 10:35:30 +00:00
naruse
3e92b635fb
Add frozen_string_literal: false for all files
...
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
hsbt
bf09511754
* test/rdoc/test_rdoc_rdoc.rb (TestRDocRDoc#test_parse_file_encoding):
...
typofix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 01:41:28 +00:00
hsbt
d42d6e690e
* lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05 01:41:25 +00:00
nobu
c11f98eddc
test/rdoc: avoid tempfile leaks
...
* test/rdoc/test_rdoc_parser.rb (test_class_for_forbidden): avoid
tempfile leaks by using `Tempfile.create` instead of
`Tempfile.open`.
* test/rdoc/test_rdoc_rd_block_parser.rb (test_parse_include_subtree):
ditto.
* test/rdoc/test_rdoc_rdoc.rb (test_parse_file_encoding): ditto.
* test/rdoc/test_rdoc_rdoc.rb (test_parse_file_forbidden): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-26 13:33:06 +00:00
drbrain
df7dac9174
* lib/rdoc: Update to RDoc 4.1.0.preview.1
...
RDoc 4.1.0 contains a number of enhancements including a new default
style and accessibility support. You can see the changelog here:
https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
* test/rdoc: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-18 23:33:36 +00:00
nobu
835c555f7f
options.rb: include root for out-place build
...
* lib/rdoc/options.rb (RDoc#finish): include root path in include
paths, to work in another directory than the source directory.
[ruby-core:56282] [Bug #8712 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 19:06:21 +00:00
drbrain
f3b24b5b7f
* lib/rdoc/cross_reference.rb: Fixed matching of C#=== or #===. RDoc
...
bug #164
* test/rdoc/test_rdoc_cross_reference.rb: Test for above.
* lib/rdoc/parser/changelog.rb: Fixed parsing of dates. RDoc bug #165
* test/rdoc/test_rdoc_parser_changelog.rb: Test for above.
* lib/rdoc/parser.rb: Fixed parsing multibyte files with incomplete
characters at byte 1024. [ruby-trunk - Bug #6393 ]
Fixed handling of -E. [ruby-trunk - Bug #6392 ]
* test/rdoc/test_rdoc_options.rb: Test for above.
* test/rdoc/test_rdoc_parser.rb: ditto.
* test/rdoc/test_rdoc_parser_c.rb: ditto.
* test/rdoc/test_rdoc_parser_changelog.rb: ditto.
* test/rdoc/test_rdoc_parser_markdown.rb: ditto.
* test/rdoc/test_rdoc_parser_rd.rb: ditto.
* test/rdoc/test_rdoc_rdoc.rb: ditto.
* lib/rdoc/tom_doc.rb: Fixed parsing of [] in TomDoc arguments list.
RDoc bug #167
* test/rdoc/test_rdoc_tom_doc.rb: Test for above.
* lib/rdoc.rb: Update version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 06:16:13 +00:00
nobu
b3f491d3cb
test_rdoc_rdoc.rb: use File::NULL
...
* test/rdoc/test_rdoc_rdoc.rb (TestRDocRDoc#test_normalized_file_list_non_file_directory):
use File::NULL for portability if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-12 07:08:06 +00:00
drbrain
b65b75bf2c
* lib/rdoc/options.rb: Added --page-dir option for moving pages in
...
doc/ to the top-level.
* lib/rdoc/rdoc.rb: ditto.
* test/rdoc/test_rdoc_options.rb: Test for the above.
* test/rdoc/test_rdoc_rdoc.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-11 07:44:56 +00:00
drbrain
09af9d7f7f
* lib/rdoc/generator/darkfish.rb: Silenced warning
...
* test/rdoc/test_rdoc_rdoc.rb: ditto
* lib/rdoc/markup/parser.rb: Use byteslice when available for
performance
* test/rdoc/test_rdoc_markup_parser.rb: Test for above
* lib/rdoc/test_case.rb: ditto
* lib/rdoc/parser/ruby.rb: Fixed bug parsing yield({})
* test/rdoc/test_rdoc_parser_ruby.rb (end):
* lib/rdoc/rubygems_hook.rb: Skip default gems. Display generator
name properly.
* test/rdoc/test_rdoc_rubygems_hook.rb: Test for above
* lib/rdoc/servlet.rb: Fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 23:34:29 +00:00
naruse
07b10cd59f
* lib/rdoc/test_case.rb (RDoc::TestCase#verbose_capture_io):
...
defined for asserts of warnings.
* test/rdoc: use verbose_capture_io on asserts of warnings.
they failed when tests was run with RUBYOPT=-W0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 07:01:46 +00:00
drbrain
6d1266a879
* lib/rdoc/*: Added --root option for building documentation outside
...
the source directory.
* test/rdoc/*: ditto
* common.mk (rdoc): Added --root to rdoc rule
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 08:54:03 +00:00
drbrain
ef8e0908af
* test/rdoc/test_rdoc_generator_darkfish.rb: Updated tests for windows
...
* test/rdoc/test_rdoc_options.rb: ditto
* test/rdoc/test_rdoc_parser.rb: ditto
* test/rdoc/test_rdoc_rdoc.rb: ditto
* test/rdoc/test_rdoc_ri_driver.rb: ditto
* test/rdoc/test_rdoc_servlet.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 07:09:21 +00:00
drbrain
1c279a7d27
* lib/rdoc*: Updated to RDoc 4.0 (pre-release)
...
* bin/rdoc: ditto
* test/rdoc: ditto
* NEWS: Updated with RDoc 4.0 information
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 04:28:14 +00:00
drbrain
b7528b5edb
* lib/rdoc.rb: Import RDoc 3.7 release candidate
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 04:59:24 +00:00
drbrain
cc2a16d94d
Import RDoc 3.5.1
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-02 00:32:30 +00:00
drbrain
2ef9c50c6e
Import RDoc 3
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-20 03:22:49 +00:00