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

75189 Коммитов

Автор SHA1 Сообщение Дата
Jimmy Miller 2d5b723b2f
Fix build when enable_shared is on (#6924)
Before this change, if enable_shared was true, the directory would have a suffix of -static and be deleted on each make install. This would cause a second make install to fail.
2022-12-13 21:59:21 -08:00
git a7cf39bba8 Update default gems list at 87d32376d9 [ci skip] 2022-12-14 05:54:44 +00:00
Hiroshi SHIBATA 87d32376d9 [ruby/readline-ext] Bump version to 0.1.5
https://github.com/ruby/readline-ext/commit/7af996f24b
2022-12-14 05:54:06 +00:00
git a3b2719a09 Update default gems list at 0c27c1b3fc [ci skip] 2022-12-14 05:49:54 +00:00
Hiroshi SHIBATA 0c27c1b3fc [ruby/open3] Bump version to 0.1.2
https://github.com/ruby/open3/commit/38904e204d
2022-12-14 05:49:14 +00:00
git 6b41a2f9e7 Update default gems list at 067747bb9a [ci skip] 2022-12-14 05:36:41 +00:00
Hiroshi SHIBATA 067747bb9a [ruby/tempfile] Bump version to 0.1.3
https://github.com/ruby/tempfile/commit/99dc1f7058
2022-12-14 05:35:48 +00:00
Hiroshi SHIBATA 03927b565b
Pin syntax_suggest-1.0.1 manually because it mixed dead_end tags 2022-12-14 12:57:30 +09:00
TSUYUSATO Kitsune fbedadb61f
Add `Regexp.linear_time?` (#6901) 2022-12-14 12:57:14 +09:00
HASUMI Hitoshi fe3cbc61c8 [ruby/reline] Fix a misparameter of RubyLex#set_input in
termination_checker.rb
(https://github.com/ruby/reline/pull/482)

* Fix a misparameter of RubyLex#set_input in termination_checker.rb

The keyword parameter `:context` of RubyLex#set_input became mandatory due to this commit:
https://github.com/ruby/irb/pull/427/files#diff-612b926e42ed78aed1a889ac1944f7d22229b3a489cc08f837a7f75eca3d3399R51

Without my patch, tests that specify "--auto-indent" option in test_yamatanooroti fall into an infinite loop.

This would need more explanation:
- The infinite loop happens in Yamatanooroti::VTermTestCaseModule#sync
  see: https://github.com/aycabta/yamatanooroti/blob/v0.0.9/lib/yamatanooroti/vterm.rb#L60-L63
- `@pty_output.read_nonblock(1024)` actually returned an exception
- However, this method doesn't anticipate such a situation
- As a result, `startup_message` couldn't be resolved for good and the
  infinite loop happens
- I think we would eventually have to fix yamatanooroti, though the
  inconsistency of the kwarg of "set_input" has to be fixed anyway

The actual exception message that is raised but ignored silently in Yamatanooroti::VTermTestCaseModule#sync:

```
/home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/irb-d30c0c994351/lib/irb/ruby-lex.rb:51:in `set_input': missing keyword: :context (ArgumentError)
        from /home/hasumi/work/ruby/reline/test/reline/yamatanooroti/termination_checker.rb:23:in `initialize'
        from /home/hasumi/work/ruby/reline/test/reline/yamatanooroti/multiline_repl:43:in `new'
        from /home/hasumi/work/ruby/reline/test/reline/yamatanooroti/multiline_repl:43:in `block in <main>'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/optparse.rb:1576:in `block in parse_in_order'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/optparse.rb:1559:in `catch'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/optparse.rb:1559:in `parse_in_order'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/optparse.rb:1553:in `order!'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/optparse.rb:1659:in `permute!'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/optparse.rb:1684:in `parse!'
        from /home/hasumi/work/ruby/reline/test/reline/yamatanooroti/multiline_repl:174:in `<main>'
```

Backtrace of an inifinite loop:

```
/home/hasumi/work/ruby/yamatanooroti/lib/yamatanooroti/vterm.rb:59:in `sleep': Interrupt
        from /home/hasumi/work/ruby/yamatanooroti/lib/yamatanooroti/vterm.rb:59:in `block in sync'
        from /home/hasumi/work/ruby/yamatanooroti/lib/yamatanooroti/vterm.rb:58:in `loop'
        from /home/hasumi/work/ruby/yamatanooroti/lib/yamatanooroti/vterm.rb:58:in `sync'
        from /home/hasumi/work/ruby/yamatanooroti/lib/yamatanooroti/vterm.rb:28:in `start_terminal'
        from /home/hasumi/work/ruby/reline/test/reline/yamatanooroti/test_rendering.rb:653:in `test_suppress_auto_indent_just_after_pasted'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testcase.rb:871:in `run_test'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testcase.rb:566:in `block (2 levels) in run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/fixture.rb:276:in `block in create_fixtures_runner'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/fixture.rb:257:in `run_fixture'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/fixture.rb:292:in `run_setup'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testcase.rb:564:in `block in run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testcase.rb:563:in `catch'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testcase.rb:563:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testsuite.rb:124:in `run_test'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testsuite.rb:53:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testsuite.rb:124:in `run_test'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testsuite.rb:53:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testsuite.rb:124:in `run_test'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testsuite.rb:53:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testsuite.rb:124:in `run_test'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/testsuite.rb:53:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunnermediator.rb:67:in `run_suite'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunnermediator.rb:45:in `block (2 levels) in run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunnermediator.rb:102:in `with_listener'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunnermediator.rb:41:in `block in run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunnermediator.rb:39:in `catch'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunnermediator.rb:39:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunner.rb:40:in `start_mediator'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunner.rb:25:in `start'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/ui/testrunnerutilities.rb:24:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/autorunner.rb:458:in `block in run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/autorunner.rb:514:in `change_work_directory'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/autorunner.rb:457:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit/autorunner.rb:66:in `run'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/test-unit-3.5.5/lib/test/unit.rb:518:in `block (2 levels) in <top (required)>'
```

* Fix mock object of Context

The previous commit solved one problem, but it found the next problem.

Following error message got from the command `RELINE_STDERR_TTY=error.log rake test_yamatanooroti`:

```
Reline is used by 24373
/home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/irb-d30c0c994351/lib/irb/ruby-lex.rb:151:in `ripper_lex_without_warning': private method `local_variables' called for #<struct auto_indent_mode=true, workspace=nil> (NoMethodError)

    lvars_code = generate_local_variables_assign_code(context&.local_variables || [])
                                                             ^^^^^^^^^^^^^^^^^
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/irb-d30c0c994351/lib/irb/ruby-lex.rb:213:in `block in set_auto_indent'
        from /home/hasumi/work/ruby/reline/lib/reline/line_editor.rb:1721:in `process_auto_indent'
        from /home/hasumi/work/ruby/reline/lib/reline/line_editor.rb:1663:in `input_key'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:346:in `block (3 levels) in inner_readline'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:345:in `each'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:345:in `block (2 levels) in inner_readline'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:420:in `block in read_io'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:390:in `loop'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:390:in `read_io'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:343:in `block in inner_readline'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:341:in `loop'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:341:in `inner_readline'
        from /home/hasumi/work/ruby/reline/lib/reline.rb:271:in `readmultiline'
        from /home/hasumi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/forwardable.rb:238:in `readmultiline'
        from /home/hasumi/work/ruby/reline/test/reline/yamatanooroti/multiline_repl:185:in `<main>'
```

In irb/ruby-lex.rb, `context` is originally supposed to be an instance of IRB::Context with a public method `#local_variables`.
However, the `context` in reline/test/reline/yamatanooroti/termination_checker.rb is a Struct that is a mock object with no `#local_variables` method.

Thus, `rake test_yamatanooroti` no longer causes an infinite loop and an unexpected error with these two commits (at least in WITH_VTERM environment)

* Name the Struct "MockIRBContext" to specify what it is for
2022-12-14 00:00:39 +00:00
Matt Valentine-House 83c12b5baa [ci skip] Fix Doxygen for ROBJECT Macro 2022-12-13 15:42:14 -05:00
MSP-Greg 74995162fc
socket.rb - don't load io/wait (#6922)
See d2166c09b0 and #6036 for more context.
2022-12-14 08:57:38 +13:00
zverok 1859784422 [ruby/date] Implement Date#deconstruct_keys and DateTime#deconstruct_keys
https://github.com/ruby/date/commit/6bb6d3a810
2022-12-13 19:52:06 +00:00
git 25f727d4ca Update default gems list at a1dba60b5b [ci skip] 2022-12-13 18:37:48 +00:00
Takashi Kokubun a1dba60b5b [ruby/irb] Version 1.6.1
https://github.com/ruby/irb/commit/229476ba76
2022-12-13 18:36:45 +00:00
Matt Valentine-House 856e0279ec fix indentation: gc_compact_destination_pool
[ci skip]

Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
2022-12-13 13:31:10 -05:00
Takashi Kokubun a66a69865d
YJIT: Change the default mem size to 64MiB (#6912)
* YJIT: Change the default mem size to 64MiB

* Also update ruby --help

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2022-12-13 11:00:22 -05:00
Nobuyoshi Nakada 99d0a257af [ruby/openssl] [DOC] Remove duplicate doc
RDoc does not consider preprocessor conditionals, but equally uses
both documents of `#if` and `#else` sides.

https://github.com/ruby/openssl/commit/ea0a112a0c
2022-12-13 19:55:18 +09:00
Hiroshi SHIBATA 3de7ff8eb9
We should apply https://github.com/ruby/openssl/pull/576 instead of them:
6d8f396f37
  c8b3bd45cc
2022-12-13 18:07:41 +09:00
Henrique Bontempo 2be03fb5b0
[ruby/openssl] Fixes OPENSSL_LIBRARY_VERSION description on
documentation
(https://github.com/ruby/openssl/pull/559)

Adds back missing constant description on the documentation.
2022-12-13 18:07:41 +09:00
Theo Buehler 8ab8c2d601
[ruby/openssl] Enable HKDF support for LibreSSL 3.6 and later
LibreSSL 3.6 added support for HKDF in EVP. Enable this in ossl_kdf.c.

https://github.com/ruby/openssl/commit/9bdd39a7e2
2022-12-13 18:07:41 +09:00
Yusuke Nakamura d4dce27d89
[ruby/openssl] Allow empty string to OpenSSL::Cipher#update
For some reasons, plaintext may be empty string.

ref https://www.rfc-editor.org/rfc/rfc9001.html#section-5.8

https://github.com/ruby/openssl/commit/953592a29e
2022-12-13 18:07:41 +09:00
Theo Buehler d92f4fe4d7
[ruby/openssl] Use EVP_Digest{Sign,Verify} when available
LibreSSL 3.4 added EVP_DigestSign() and EVP_DigestVerify(). Use them
when available to prepare for the addition of Ed25519 support in
LibreSSL 3.7.

https://github.com/ruby/openssl/commit/475b2bf766
2022-12-13 18:07:41 +09:00
Jarek Prokop ce025a5cb4
[ruby/openssl] Use SHA256 instead of SHA1 where needed in tests.
Systems such as RHEL 9 are moving away from SHA1
disabling it completely in default configuration.

https://github.com/ruby/openssl/commit/32648da2f6
2022-12-13 18:07:41 +09:00
Nobuyoshi Nakada 764da87ab0 [Bug #19195] Allow optional newlines before closing parenthesis 2022-12-13 18:06:11 +09:00
Takashi Kokubun 3262842e0a
Skip calling f.read for `overwrite: true`-only cases
We only need to set outpath for that case.
2022-12-13 00:25:02 -08:00
Takashi Kokubun 5ba9dcff16
Make sure f.read is not called twice
--revision.h and --if-change are not used simultaneously, but they might
be in the future.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-12-13 00:17:47 -08:00
Takashi Kokubun 7edcdc380f
Avoid overwriting revision.h when .git doesn't exist (#6915)
* Avoid overwriting revision.h when .git doesn't exist

* Overwrite revision.h if it's blank
2022-12-12 23:34:30 -08:00
Hiroshi SHIBATA 3e00cb8256 Merge RubyGems/Bundler master
from 1fdbeeabed
2022-12-13 12:41:08 +09:00
David Rodríguez 6d00053c74 [rubygems/rubygems] Use better matcher
Hopefully it gives a better error.

https://github.com/rubygems/rubygems/commit/5bc9ff64b6
2022-12-13 12:41:08 +09:00
dependabot[bot] 91050d3443 [rubygems/rubygems] Bump rb-sys in /test/rubygems/test_gem_ext_cargo_builder/custom_name
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.46 to 0.9.48.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.46...v0.9.48)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 22:29:39 +00:00
John Hawthorn 43f9351177 Fix parens on LIKELY in basic operators
We want to hint to the compiler that it's likely that the BOP is
unredefined (the bit is 0). Previously we were accidentally hinting to
the compiler that it was non-zero due to a misplaced parenthesis.
2022-12-12 14:05:43 -08:00
David Rodríguez 17559f0420 Don't leave backup file around
I suspect this was for debugging? If not, these days we have source
control tools, so this wouldn't seem necessary?
2022-12-13 07:01:52 +09:00
Stan Lo f88f2bd92f [ruby/irb] Group show_doc tests and update the expectation
(https://github.com/ruby/irb/pull/479)

https://github.com/ruby/irb/commit/bede04c14a
2022-12-12 21:05:03 +00:00
Alan Wu 258ac07907
YJIT: Generate debug info in release builds (#6910)
* YJIT: Generate debug info in release builds

They are helpful in case we need to do core dump debugging.

* Remove Cirrus DOC skip rule

The syntax for this is weird, and escaping [ and ] cause parse failures.
Cirrus' docs said to surround with .*, but then that seems to skip
everything. Revert e0a4205eb7 for now.
2022-12-12 15:59:29 -05:00
Maxime Chevalier-Boisvert 1004d693b7
Make it so YJIT is no longer marked as experimental (#6909)
Tested on production workloads at Shopify for > 1 year and proven
to be quite stable. Enabling YJIT at run-time is still guarded
behind the --yjit command-line option for now.
2022-12-12 15:13:46 -05:00
dependabot[bot] 8e619b8e0e [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.46 to 0.9.48.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.46...v0.9.48)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 20:04:00 +00:00
Burdette Lamar 63f682ba11 [ruby/net-http] [DOC] Enhanced RDoc for HTTPHeader
(https://github.com/ruby/net-http/pull/88)

https://github.com/ruby/net-http/commit/46e966be10
2022-12-12 19:34:21 +00:00
Stan Lo 223d4448c8 [ruby/irb] `show_doc` command should take non-string argument too
(https://github.com/ruby/irb/pull/478)

Given that `show_doc` already supports syntax like `String#gsub`, it
should be able to take it in non-string form too, like `edit` and
`show_source` do. This ensures users can have a consistent syntax on
argument between different commands.
2022-12-12 17:35:48 +00:00
Takashi Kokubun ece6246057
YJIT: Implement opt_newarray_max instruction (#6893) 2022-12-12 10:19:24 -05:00
Peter Zhu 5302d04e5a [DOC] Fix format in ObjectSpace.dump_all 2022-12-12 10:16:38 -05:00
Peter Zhu be710c1bf7 [DOC] Fix format for ObjectSpace.dump_shapes 2022-12-12 10:15:24 -05:00
Peter Zhu a9c3dc8d2e [DOC] Fix call-seq for ObjectSpace methods 2022-12-12 09:58:39 -05:00
Peter Zhu 58e3ce5de6 [DOC] Fix typo in docs for ObjectSpace.dump_all 2022-12-12 09:56:44 -05:00
Peter Zhu 87d5470873 [DOC] Fix indentation for ObjectSpace.dump_all 2022-12-12 09:51:12 -05:00
Peter Zhu 0b4fda11ec [DOC] Don't document private methods in objspace 2022-12-12 09:48:06 -05:00
Nobuyoshi Nakada 6d6b1e5990
Display error messages outside the groups so can be found quickly 2022-12-12 23:32:37 +09:00
Nobuyoshi Nakada e809bd31fd
Fix positional argument color [ci skip] 2022-12-12 23:32:37 +09:00
Nobuyoshi Nakada 0ba65c689e
outdate-bundled-gems.rb: check for gemspec files for extensions
https://github.com/ruby/setup-ruby/issues/415#issuecomment-1345662263
2022-12-12 17:05:37 +09:00
Nobuyoshi Nakada ff6831c334
outdate-bundled-gems.rb: remove unused option 2022-12-12 17:05:03 +09:00