Граф коммитов

65793 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Evans 9c31fb6114 Fix documentation for Enumerator::Lazy#with_index
If a block is given, it returns a lazy enumerator that will iterate
over the block, it doesn't iterate over the block immediately.

Fixes [Bug #17789]
2021-04-09 10:44:07 -07:00
Yusuke Endoh 582f4bc188 test/ruby/test_gc_compact.rb: Use assert_separately for debugging
... the following timeout failure.

http://rubyci.s3.amazonaws.com/rhel_zlinux/ruby-master/log/20210408T213303Z.fail.html.gz
```
[ 8871/21204] TestGCCompact#test_ast_compactstimeout: output interval exceeds 600.0 seconds.
timeout: the process group 28416 is alive.
PSOUT  PGID   PID     ELAPSED %CPU    VSZ COMMAND         COMMAND
PSOUT 28416 28416       12:46  0.0 108120 gmake           gmake TESTS=--hide-skip -v RUBYOPT=-w test-all
PSOUT 28416 28423       12:46 88.2 1446124 ruby           ./test/runner.rb: TestGCCompact#test_ast_compacts
timeout: INT signal sent.
timeout: INT signal sent.
timeout: TERM signal sent.
timeout: TERM signal sent.
timeout: KILL signal sent.
```

This error repeatedly occurs on RHEL s390x.

This change sends SEGV when timeout occurs so that it should dump the backtrace.
2021-04-09 13:59:46 +09:00
aycabta 6496c76d2a [ruby/reline] Add calling Reline::Config#reset_default_key_bindings to #reset, which is forgot to call 2021-04-09 11:57:28 +09:00
git a6ae593ca0 * 2021-04-09 [ci skip] 2021-04-09 00:01:08 +09:00
Jeremy Evans 5c4ff3f00c Document how to handle kill/terminate interrupts in Thread.handle_interrupt
The kill/terminate interrupts are internally handled not as Exception
instances, but as integers.  So using Exception doesn't handle these
interrupts, but Object does.  You can use Integer if you only want to
handle kill/terminate interrupts, but that's probably more of an
implementation detail, while handling Object should work regardless
of the implementation.

Fixes [Bug #15735]
2021-04-08 07:53:06 -07:00
Nobuyoshi Nakada 0395aa6bbb
Make the return type of rb_char_next the same as CharNext 2021-04-08 21:41:00 +09:00
Nobuyoshi Nakada b0b3022f95
[ruby/reline] Moved development dependencies to Gemfile
As expressions in a gemspec file are evaluated at the build time,
but not the run time, the conditional in the gemspec will not work
as intended.

https://github.com/ruby/reline/commit/c09b7c454a
2021-04-08 21:41:00 +09:00
aycabta 5543695a19
[ruby/reline] Separate keystrokes each editing mode
https://github.com/ruby/reline/commit/ee23e6f3f8
2021-04-08 21:41:00 +09:00
aycabta 16f31da92e
[ruby/reline] Check WITH_VTERM env to add vterm gem as dependency
https://github.com/ruby/reline/commit/27b689a7e2
2021-04-08 21:41:00 +09:00
Nobuyoshi Nakada 9e940eae60
[ruby/irb] Moved development dependencies to Gemfile
As expressions in a gemspec file are evaluated at the build time,
but not the run time, the conditional in the gemspec will not work
as intended.

https://github.com/ruby/irb/commit/42f364ea23
2021-04-08 21:41:00 +09:00
Nobuyoshi Nakada 3816157e5d [ruby/irb] Ripper::Lexer::Elem#state is defined since Ruby 2.5
And the required ruby version is 2.5 or later.

https://github.com/ruby/irb/commit/ac496d4c78
2021-04-08 20:42:14 +09:00
Nobuyoshi Nakada d825e34962
Use autogen.sh 2021-04-08 20:36:58 +09:00
Yusuke Endoh ee372aa873 test/zlib/test_zlib.rb: Set binmode to test output file
Seems like the test `TestZlibGzipFile#test_gzip_reader_zcat` fails when
the timestamp has `\n\n`.

https://ci.appveyor.com/project/ruby/ruby/builds/38597932
```
  1) Error:
TestZlibGzipFile#test_gzip_reader_zcat:
Zlib::DataError: invalid distance too far back
    C:/projects/ruby/test/zlib/test_zlib.rb:522:in `initialize'
    C:/projects/ruby/test/zlib/test_zlib.rb:522:in `new'
    C:/projects/ruby/test/zlib/test_zlib.rb:522:in `zcat'
    C:/projects/ruby/test/zlib/test_zlib.rb:522:in `block (2 levels) in test_gzip_reader_zcat'
    C:/projects/ruby/test/zlib/test_zlib.rb:521:in `open'
    C:/projects/ruby/test/zlib/test_zlib.rb:521:in `block in test_gzip_reader_zcat'
    C:/projects/ruby/lib/tempfile.rb:358:in `create'
    C:/projects/ruby/test/zlib/test_zlib.rb:510:in `test_gzip_reader_zcat'
```

The test time is around 2021-04-08 04:40 +0900. Maybe the following time
should trigger the bug.

```
irb(main):001:0> Time.at(1617824266)
=> 2021-04-08 04:37:46 +0900
irb(main):002:0> [1617824266].pack("V")
=> "\n\nn`"
```
2021-04-08 14:26:42 +09:00
Olle Jonsson ec355813b0
[ruby/optparse] gemspec: Explicit files list [ci skip]
This avoid shelling out, and includes a narrower list of files.

https://github.com/ruby/optparse/commit/f3ca83caff

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-04-08 12:37:24 +09:00
BurdetteLamar a5ecce9187
[ruby/optparse] Make use of option_params.rdoc
https://github.com/ruby/optparse/commit/d55d9284c3
2021-04-08 12:11:42 +09:00
Burdette Lamar 5891159f96
[ruby/optparse] Enhanced doc for option parameters (#11)
https://github.com/ruby/optparse/commit/5618eeb49e
2021-04-08 12:11:42 +09:00
Burdette Lamar fe72cff487
[ruby/optparse] More on tutorial (#9)
* More on tutorial: clearer example output

https://github.com/ruby/optparse/commit/84dfd92d2a
2021-04-08 12:11:32 +09:00
Olle Jonsson 2b66b22479 [ruby/optparse] gemspec: Explicitly list 0 executables
This gem exposes no executable files.

https://github.com/ruby/optparse/commit/d14bf83007
2021-04-08 12:09:30 +09:00
BurdetteLamar 0d1d779c23 [ruby/optparse] Beginnings of tutorial
https://github.com/ruby/optparse/commit/f209276f79
2021-04-08 12:09:29 +09:00
Nobuyoshi Nakada 956056db37
sync_default_gems.rb: do not reset the whole directory [ci skip]
If no files to be ignored, resetting with no argument means
resetting the whole directory.
2021-04-08 12:04:25 +09:00
git cdc0cdc77f * 2021-04-08 [ci skip] 2021-04-08 04:17:17 +09:00
Peter Zhu d8a13e5049 [Bug #17780] Fix Method#super_method for module alias
Method#super_method crashes for aliased module methods because they are
not defined on a class. This bug was introduced in
c60aaed185 as part of bug #17130.
2021-04-07 15:16:58 -04:00
git 587e680008 * 2021-04-07 [ci skip] 2021-04-07 16:43:58 +09:00
Yusuke Endoh fbbc37dc1d test/drb/test_drb.rb: Specify the host of DRbServer
to try fixing the following error.

http://rubyci.s3.amazonaws.com/opensuseleap/ruby-master/log/20210407T063004Z.log.html.gz
```
[  605/21105] DRbTests::TestDRbSSLAry#test_06_next/home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/lib/drb/drb.rb:1138:in `method_missing': undefined method `regist' for [1, 2, "III", 4, "five", 6]:Array (NoMethodError)
	from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/lib/drb/extserv.rb:21:in `block in initialize'
	from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/.ext/common/monitor.rb:202:in `synchronize'
	from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/.ext/common/monitor.rb:202:in `mon_synchronize'
	from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/lib/drb/extserv.rb:20:in `initialize'
	from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/test/drb/ut_array_drbssl.rb:35:in `new'
	from /home/chkbuild/chkbuild/tmp/build/20210407T063004Z/ruby/test/drb/ut_array_drbssl.rb:35:in `<main>'
 = 100.05 s
```

Here is my analysis:
The test of drb used both `druby://:0` and `druby://localhost:0` for
DRbServer. However, the former listens on IPv4, and the latter does on
IPv6, depending on environments. The port 0 is automatically assigned,
but sometimes the same port is used to both because they are different
protocols (IPv4 and IPv6). In this case, their URIs are resolved to the
completely same one (`druby://localhost:port`), which confuses the
method `DRb.here?` which determines the DRbObject is remote or local.

This changeset uses `druby://localhost:0` consistently.
2021-04-07 16:34:19 +09:00
Kazuhiro NISHIYAMA 31ba817887
Try to fix Leaked file descriptor
https://github.com/ruby/ruby/runs/2274767991?check_suite_focus=true#step:15:118
```
Leaked file descriptor: DRbTests::TestDRbTCP#test_immediate_close: 7 : #<TCPServer:fd 7, AF_INET, 0.0.0.0, 42451>
Leaked file descriptor: DRbTests::TestDRbTCP#test_immediate_close: 9 : #<IO:fd 9>
Leaked file descriptor: DRbTests::TestDRbTCP#test_immediate_close: 10 : #<IO:fd 10>
```
2021-04-06 16:03:20 +09:00
Yusuke Endoh 93c73ab898 spec/ruby/library/matrix/: Change the version guard to 3.0.2
[Bug #17521] is not backported to 3.0.1.
2021-04-06 15:19:23 +09:00
NARUSE, Yui ff91b97c83 The guard is to alert patchlevel of X.Y.0 2021-04-06 12:02:46 +09:00
git 3e5b691410 * 2021-04-06 [ci skip] 2021-04-06 09:34:48 +09:00
Nobuyoshi Nakada d235dd4461
update-deps: prepare to run if not yet done 2021-04-06 09:33:53 +09:00
Yusuke Endoh e0bd293855 Update tool/format-release
* remove bz2 entries for Ruby 3 series
* remove stats information except "X.X.0" release
2021-04-05 23:19:44 +09:00
Nobuyoshi Nakada 856a9701fd
Get rid of multibyte prefix to tmpdir 2021-04-05 21:20:51 +09:00
Hiroshi SHIBATA a00d92326c
[ruby/tmpdir] Bump version to 0.1.2
https://github.com/ruby/tmpdir/commit/c79bc7adf6
2021-04-05 21:08:58 +09:00
Nobuyoshi Nakada 4b6fa03a72
[ruby/tmpdir] Make usable chars more strict
Remove other than alphanumeric and some punctuations considered
filesystem-safe, instead of removing some unsafe chars only.

https://hackerone.com/reports/1131465

https://github.com/ruby/tmpdir/commit/adf294bc2d
2021-04-05 21:08:57 +09:00
Yusuke Endoh 2f992272f2
Update REXML to 3.2.5 (#4353) 2021-04-05 21:07:19 +09:00
Nobuyoshi Nakada 4b92633043 [ruby/irb] Suppress verbose messages in the parallel test
`:VERBOSE` flag needs to be set prior to `IRB::Irb.new`.

https://github.com/ruby/irb/commit/0dbe292979
2021-04-05 14:00:21 +09:00
git d30d1e648d * 2021-04-05 [ci skip] 2021-04-05 11:48:02 +09:00
Kenichi Kamiya 52fb0a2932 [Doc] Drop signature around removed IO#codepoints
Follow 43b95bafd5
2021-04-05 11:47:42 +09:00
Nobuyoshi Nakada 3cd3d25dde
Unify code by word sizes 2021-04-04 23:29:16 +09:00
aycabta bacb646169 [ruby/irb] Check WITH_VTERM env to add vterm gem as dependency
https://github.com/ruby/irb/commit/23c8b73cb1
2021-04-04 22:39:16 +09:00
Yusuke Endoh 2fcae4f90a test/ruby/test_lambda.rb: Remove "warning: assigned but unused variable" 2021-04-04 15:26:09 +09:00
git ffaaa2e65d * 2021-04-04 [ci skip] 2021-04-04 11:35:14 +09:00
S.H be343946c7
Refactor rb_obj_call_init and rb_obj_call_init_kw (#4351) 2021-04-04 11:34:51 +09:00
aycabta 47abb70234 [ruby/reline] Use vterm 0.0.5 or newer on Unix like OSes because suppresses SEGV
https://github.com/ruby/reline/commit/7562cf3b5f
2021-04-03 20:22:56 +09:00
aycabta 281c6f5055 [ruby/irb] Use vterm 0.0.5 or newer on Unix like OSes because suppresses SEGV
https://github.com/ruby/irb/commit/b034bd22b0
2021-04-03 20:21:09 +09:00
aycabta f079318187 [ruby/irb] Use yamatanooroti gem for tests
https://github.com/ruby/irb/commit/f053f49c29
2021-04-03 20:21:02 +09:00
Kenichi Kamiya 6b906ad564
[Doc] Link to doc/contributing.rdoc from CONTRIBUTING.md (#4266)
* [Doc] Link to doc/contributing.rdoc from CONTRIBUTING.md

[ci skip]

* [Doc] Add path prefix `doc/`

https://github.com/ruby/ruby/pull/4266#discussion_r598220279

* [Doc] Prefer relative path in CONTRIBUTING.md

This patch by nobu (Nobuyoshi Nakada), thank you!

ref: https://github.com/ruby/ruby/pull/4266#discussion_r598212402

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-04-03 14:45:18 +09:00
aycabta 8a4472fb6d [ruby/reline] Version 0.2.5
https://github.com/ruby/reline/commit/22ce5651e5
2021-04-03 01:28:42 +09:00
aycabta 3ffb04474a [ruby/irb] Version 1.3.5
https://github.com/ruby/irb/commit/22e2ddf715
2021-04-03 01:25:58 +09:00
Nobuyoshi Nakada 64b991b0cd [ruby/rdoc] Links to document texts without "rdoc-ref:" prefix
While links to generated HTML from RDoc file needs to be prefixed
by "rdoc-ref:" currently, in case of explicit references this
seems just redundant.

Also GitHub RDoc support does not work with this prefix.

This patch lets links to such document texts (".rb", ".rdoc" and
".md" now) refer URLs generated by `RDoc::TopLevel#http_url`
without the prefix.

https://github.com/ruby/rdoc/commit/f18b27b69d
2021-04-03 01:22:09 +09:00
Nobuyoshi Nakada a6948329f8 [ruby/rdoc] Clarify that dots in URL are replaced
The dots in all path components from the document root are
replaced with underscores, not only in the basename.

https://github.com/ruby/rdoc/commit/7a3417ea4c
2021-04-03 01:22:00 +09:00