78383 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
1c2a4d9682 Shrink ruby_cmdline_options_t a bit 2023-07-13 22:59:26 +09:00
Peter Zhu
1e7b67f733 [Feature #19730] Remove transient heap 2023-07-13 09:27:33 -04:00
Shane Becker
fff4773085 [DOC] Add parenthetical to explain what FIFO abbrev means 2023-07-13 21:39:31 +09:00
B. Burt
0454887a0e [ruby/getoptlong] [DOC] Add spaces to fix formatting in example
To make the example code verbatim.
Fixes ruby/ruby#8061

https://github.com/ruby/getoptlong/commit/85fe502916
2023-07-13 12:30:23 +00:00
Hiroshi SHIBATA
76ef28186f
[DOC] Removed redundant the 2023-07-13 20:30:44 +09:00
Nobuyoshi Nakada
e098468d7f
Let [DOC] in PR title skip CIs 2023-07-13 19:08:50 +09:00
Nobuyoshi Nakada
9c1fe9064c
[Feature #19757] Add new API rb_data_define 2023-07-13 17:55:55 +09:00
Matt Valentine-House
d426343418 Store object age in a bitmap
Closes [Feature #19729]

Previously 2 bits of the flags on each RVALUE are reserved to store the
number of GC cycles that each object has survived. This commit
introduces a new bit array on the heap page, called age_bits, to store
that information instead.

This patch still reserves one of the age bits in the flags (the old
FL_PROMOTED0 bit, now renamed FL_PROMOTED).

This is set to 0 for young objects and 1 for old objects, and is used as
a performance optimisation for the write barrier. Fetching the age_bits
from the heap page and doing the required math to calculate if the
object was old or not would slow down the write barrier. So we keep this
bit synced in the flags for fast access.
2023-07-13 09:21:36 +01:00
Shane Becker
7524675330 [DOC] Fix example code indentation from 3 to 2 2023-07-13 14:22:47 +09:00
Hiroshi SHIBATA
3ef6364a98
Move bsearch test with Bigdecimal under the test_bigdecimal.rb
When we extract bigdecimal as bundled gems, this test will be failed
  with `make test-all`.
2023-07-13 14:01:28 +09:00
Nobuyoshi Nakada
5dd969892f
Wait for sleepr thread to finish not to leak 2023-07-13 13:12:52 +09:00
David Rodríguez
c1fb25f6fc
[rubygems/rubygems] Don't run any git commands when sorting and comparing git sources
Previously, when sorting and comparing git Gemfile vs lockfile sources during
`bundler/setup` to figure out whether we need to re-resolve or not, we
would try to find the default branch if nothing more specific was
specified in the Gemfile.

If the git cache has been deleted thought, that would fail.

The error would still be swallowed (and the branch would simply not be
displayed), but trying to clone would still generate the side effect of
creating the parent folder for the clone.

That could affect non-writable systems that don't expect `bundler/setup`
to write to the filesystem at all.

To fix this, override `Bundler::Source::Git#identifier` to use
exclusively static information, so it does not even try to clone the
repo nor generate any side effects.

https://github.com/rubygems/rubygems/commit/582eb2ef39
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
8cf5297ba5
[rubygems/rubygems] Dont't use Bundler::VERSION
https://github.com/rubygems/rubygems/commit/46cd9be69a
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
d3305cab44
[rubygems/rubygems] restart with BUNDLE_VERSION if it's specified
https://github.com/rubygems/rubygems/commit/57cfe7cf8d
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
f16c880f77
[rubygems/rubygems] Introduce bundle config set version feature
https://github.com/rubygems/rubygems/commit/c431a1df52
2023-07-13 11:36:03 +09:00
David Rodríguez
8f61a4c5b2
[rubygems/rubygems] Remove unused variable
https://github.com/rubygems/rubygems/commit/802457b0a1
2023-07-13 11:36:03 +09:00
git
a74c721527 Update default gems list at 7f9c2a9bdd06a925247297b4697260 [ci skip] 2023-07-13 02:16:53 +00:00
Stan Lo
7f9c2a9bdd [ruby/irb] Bump version to 1.7.3
(https://github.com/ruby/irb/pull/639)

https://github.com/ruby/irb/commit/621c8c2b7d
2023-07-13 02:16:04 +00:00
Takashi Kokubun
b588fd5523 Remove an unused #if 0 code 2023-07-12 16:38:18 -07:00
Stan Lo
81beb29988 [ruby/irb] Correct preferred_dialog_height's caller
(https://github.com/ruby/irb/pull/638)

The caller should be the dialog itself, not Reline.

https://github.com/ruby/irb/commit/418c2b945e
2023-07-12 19:55:19 +00:00
Jemma Issroff
a02f5eb56a
YARP resync (#8059) 2023-07-12 12:46:38 -04:00
Nobuyoshi Nakada
47cb789332 [ruby/etc] Declare getlogin even if unistd.h is not available
Although MinGW provides this header but not the function, Windows
version ruby provides the function.

https://github.com/ruby/etc/commit/f7fa1884fa
2023-07-12 16:22:54 +00:00
Kazuki Yamaguchi
f4bf80623f [ruby/openssl] [DOC] remove top-level example for
OpenSSL::Cipher#pkcs5_keyivgen
(https://github.com/ruby/openssl/pull/647)

OpenSSL::Cipher#pkcs5_keyivgen should only be used when it is
absolutely necessary for compatibility with ancient applications.
Having an example can be misleading. We already have another example
for OpenSSL::Cipher in which PBKDF2 is used to derive a key.

As described in the rdoc of OpenSSL::Cipher#pkcs5_keyivgen, it is
compatible with PKCS#5 PBES1 (PKCS#5 v1.5) only when used in combination
of a hash function MD2, MD5, or SHA-1, and a cipher DES-CBC or RC2-CBC.
This example uses MD5 as the hash function and combines it with AES.
This is considered insecure and also using a non-standard technique to
derive longer keys.

https://github.com/ruby/openssl/commit/e379cc0cca
2023-07-12 23:40:58 +09:00
Ryo Kajiwara
4b6d667c63 [ruby/openssl] Add support for raw private/public keys
(https://github.com/ruby/openssl/pull/646)

Add OpenSSL::PKey.new_raw_private_key, #raw_private_key and public
equivalents. These methods are useful for importing and exporting keys
that support "raw private/public key". Currently, OpenSSL implements
X25519/X448 and Ed25519/Ed448 keys.

[rhe: rewrote commit message]

https://github.com/ruby/openssl/commit/3f29525618

Co-authored-by: Bart de Water <bartdewater@gmail.com>
2023-07-12 23:40:58 +09:00
Kazuki Yamaguchi
fb12522b00 sync_default_gems.rb: ensure that commit messages end with \n
Commit messages written on GitHub's Web UI apparently use \r\n as a
line separator and do not have a \n at the end of message, unlike those
normally made with the git CLI. This breaks the expectation of the
regexps used later.
2023-07-12 23:40:12 +09:00
Nobuyoshi Nakada
4fced78605 [ruby/etc] Chec if the target file exists, not "depend" file
https://github.com/ruby/etc/commit/b95ddef386
2023-07-12 14:18:40 +00:00
Nobuyoshi Nakada
2fa77fb82d [ruby/etc] Fix for srcdir with spaces
Fixes https://github.com/ruby/etc/pull/22.
Build failure when the ruby installed directory name contains spaces.

https://github.com/ruby/etc/commit/1ab19d5815
2023-07-12 14:18:39 +00:00
Nobuyoshi Nakada
efd8ea366b [ruby/etc] Declare getlogin only if unistd.h is not available
https://github.com/ruby/etc/commit/365398ea47
2023-07-12 14:18:39 +00:00
Peter Zhu
b90c48b1e2 Add comment to test
Add comment for 7299c8c0f165247853fac2fe337e7c2678e653c9.
2023-07-12 09:29:54 -04:00
Koichi ITO
4fbfc116ca [rubygems/rubygems] Update GitHub organization of Standard Ruby
## What was the end-user or developer problem that led to this PR?

The old URL https://github.com/testdouble/standard is mentioned.

## What is your fix for the problem, implemented in this PR?

This PR updates to the new URL https://github.com/standardrb/standard.

https://github.com/rubygems/rubygems/commit/eeafba72fc
2023-07-12 12:29:29 +00:00
Nobuyoshi Nakada
761662bbea
Revert previous commit [ci skip]
This reverts commit 074bf01e13db1ac0407786a3bc1b85c13135fd36, "Test
`Comparable#clamp` with inverse arguments as well as a Range".
The test is already in another method.
2023-07-12 13:43:25 +09:00
Nobuyoshi Nakada
074bf01e13
Test Comparable#clamp with inverse arguments as well as a Range 2023-07-12 13:31:19 +09:00
Takashi Kokubun
dfe782be17 Refactor COLLECT_USAGE_INSN 2023-07-11 17:26:03 -07:00
Takashi Kokubun
503f987ead Skip a flaky test for RJIT 2023-07-11 14:39:32 -07:00
Takashi Kokubun
d45118aaaf Remove obsoleted USE_INSNS_COUNTER macro for now
I don't use that these days. I'd like to remove this to ease a change
I'm writing. I'll resurrect this when I need this again.
2023-07-11 14:36:36 -07:00
Peter Zhu
7299c8c0f1 Try to fix flaky GC test
assert_not_nil could allocate objects which may trigger the major GC, so
don't run the assertions until the major GC has been ran.
2023-07-11 15:05:10 -04:00
git
84d0667ea8 Update default gems list at d40935c6804b87664ba0313062dc27 [ci skip] 2023-07-11 16:31:17 +00:00
ima1zumi
d40935c680 [ruby/irb] Bump version to 1.7.2
(https://github.com/ruby/irb/pull/636)

https://github.com/ruby/irb/commit/85d6b4d146
2023-07-11 16:30:34 +00:00
Jemma Issroff
d62328251d [ruby/yarp] Remove yp_location_for_node in preference of yp_newline_list_line_column
https://github.com/ruby/yarp/commit/55aa813909
2023-07-11 15:49:42 +00:00
ima1zumi
4be92463b6 [ruby/irb] Require Reline 0.3.6 or higher
(https://github.com/ruby/irb/pull/632)

* Require Reline 0.3.6 or higher

"Multi-line multibyte regular expression raises exception" (https://github.com/ruby/irb/issues/627) is fixed in Reline 0.3.6.

* Remove unnecessary conditional
2023-07-11 14:47:26 +00:00
Maxime Chevalier-Boisvert
e770006486
YJIT: add counter for untracked gbpp exit reason (#8052) 2023-07-11 10:17:48 -04:00
Nobuyoshi Nakada
1b01140d8a
Remove unused fstring 2023-07-11 19:52:37 +09:00
Jeremy Evans
3874381c44
Fix autosplat conditions to handle ruby2_keywords case
Autosplat should not occur if there are two arguments but second
argument is an array containing a ruby2_keywords splat. Only
autosplat if a single argument to be yielded to the block, and there
is no splatted flagged keyword hash passed.

Fixes [Bug #19759]
2023-07-10 10:06:23 -07:00
Jemma Issroff
53c5601565
[ruby/yarp] Fix endless method definitions binding power to accept args (#8051) 2023-07-10 10:54:12 -04:00
Nobuyoshi Nakada
880b29b74b [rubygems/rubygems] Use File::NULL instead of hard coded null device names
https://github.com/rubygems/rubygems/commit/44fe8e7f50
2023-07-10 12:11:12 +00:00
Nobuyoshi Nakada
2951e3d83b
Allow nmake to ignore errors
cmd.exe can redirect file descriptor other than STDOUT, while
command.com couldn't.
2023-07-10 19:21:47 +09:00
Nobuyoshi Nakada
c8d0470bb0
Use File::NULL instead of hard coded null device names 2023-07-10 19:21:47 +09:00
S-H-GAMELINKS
092c9b266a Reuse rb_ractor_make_shareable function for rb_ractor_make_shareable_copy function 2023-07-10 19:06:18 +09:00
krk
abfac2222b Add a realpath cache to reduce number of syscalls.
Number of lstat and stat syscalls for each 'require'd file is doubled,
because rb_realpath_internal is called from two places with the same
arguments in require_internal; once for checking the realpaths cache,
and once in load_iseq_eval when iseq is not found.

Introduce rb_realpath_internal_cached function to reuse the realpath_map
cache which memoizes rb_realpath_internal function, leading to less
syscalls and increased startup performance depending on the cost of the syscalls
in a particular environment.
2023-07-10 18:05:19 +09:00
Nobuyoshi Nakada
d516910b61
Serially update only the ripper source, even with old GNU make 2023-07-10 16:36:03 +09:00