90334 Commits

Author SHA1 Message Date
Kazuki Yamaguchi
c515da3d74 [ruby/openssl] ssl: remove cert_store from start_server test helper
OpenSSL::SSL::SSLContext#cert_store= uses SSL_CTX_set_cert_store(). The
store is used for verifying peer certificates and for building
certificate chains to be sent to the peer if there is no chain
explicitly provided by SSLContext#extra_chain_cert=.

Do not specify it in the common test helper start_server, as most
callers do not require either function. Instead, update individual test
cases that use client certificates to explicitly specify it in ctx_proc.
A more direct test case is added to verify the latter function.

https://github.com/ruby/openssl/commit/9daecee615
2025-02-19 17:08:16 +00:00
Peter Zhu
49e229b3fc Fix value of RB_GC_OBJECT_METADATA_ENTRY_COUNT
There are 7 entries in RB_GC_OBJECT_METADATA_ENTRY_COUNT.
2025-02-19 09:56:17 -05:00
Peter Zhu
ff6b1a03ab Skip TestObjSpace#test_dump_flag_age for MMTk 2025-02-19 09:47:28 -05:00
Peter Zhu
5e45f2a0bc Add age to rb_gc_object_metadata
This will allow ObjectSpace.dump to output the age of the object.
2025-02-19 09:47:28 -05:00
Peter Zhu
5acfe30880 Implement rb_gc_object_metadata for MMTk 2025-02-19 09:47:28 -05:00
Peter Zhu
7b6e07ea93 Add rb_gc_object_metadata API
This function replaces the internal rb_obj_gc_flags API. rb_gc_object_metadata
returns an array of name and value pairs, with the last element having
0 for the name.
2025-02-19 09:47:28 -05:00
BurdetteLamar
273e35cdcc [DOC] Tweaks for Hash#fetch 2025-02-19 09:46:52 -05:00
BurdetteLamar
a46997a8f7 [DOC] Tweaks for Hash#except 2025-02-19 09:46:04 -05:00
Burdette Lamar
188b3375b0
[DOC] Tweaks for Hash#eql? 2025-02-19 09:45:27 -05:00
Nobuyoshi Nakada
3f07bc76ff [Bug #21144] Win32: Use Windows time zone ID if TZ is not set
If the TZ environment variable is not set, the time zone names
retrieved from the system are localized for UI display and may vary
across editions and language packs for the same time zone.
Use the time zone IDs that are invariant across environments instead.
2025-02-19 18:27:32 +09:00
Yuta Saito
bd84c75a01 [wasm] Update WASI SDK to 25
to include WASI Preview 2 related changes added in the SDK.
2025-02-19 13:54:51 +09:00
Yuta Saito
eac35edfd1 [wasm] Stop using mprotect(PROT_NONE) on WASI
we had been using a stub weak definition of `mprotect` in wasm/missing.c
so far, but wasi-sdk 23 added mprotect emulation to wasi-libc[^1], so the
emulation is now linked instead. However, the emulation doesn't support
PROT_NONE and fails with ENOSYS, so we need to avoid calling mprotect
completely on WASI.

[^1]: 7528b13170
2025-02-19 11:46:12 +09:00
David Rodríguez
4f7dfbe58e
[rubygems/rubygems] Remove no longer necessary JRuby specific test ENV
It does not seem noisy anymore.

https://github.com/rubygems/rubygems/commit/060c5e960a
2025-02-19 11:04:09 +09:00
David Rodríguez
5d8fe7a595
[rubygems/rubygems] Make sure empty gems are not reinstalled every time
Unfortunately this requires reverting a previous enhancement of
reinstalling gems if they incorrectly ship with an empty installation
dir.

However, there's no way to distinguish this kind of bad state from a gem
that's empty for real, for example, sorbet-static-and-runtime.

This reverts commit https://github.com/rubygems/rubygems/commit/9720a9b980d2, and adds a
spec to make sure empty gems are not reinstalled every time.

https://github.com/rubygems/rubygems/commit/7c102394af
2025-02-19 11:04:09 +09:00
David Rodríguez
da97662996
[rubygems/rubygems] Don't add gemspec to specification list of our test gems
Real gems hardly ever do this, so don't do it ourselves for testing
either.

https://github.com/rubygems/rubygems/commit/2c8960cfb4
2025-02-19 11:04:09 +09:00
Samuel Williams
68f0150ff0
[ruby/json] Pass through all options if present.
https://github.com/ruby/json/commit/bea96e0a69
2025-02-19 11:04:09 +09:00
Jeremy Evans
f423f6e10c Ensure IO.copy_stream buffer is an independent string
Otherwise, changes to the buffer by the destination write method
could result in data changing for supposedly independent strings.

Fixes [Bug #21131]
2025-02-18 17:18:16 -08:00
Naoto Ono
6e510d78c0
Launchable: Remove unused file names (#12782)
I found file names that were not used anymore. I'm gonna delete them in this PR.
2025-02-19 08:48:33 +09:00
Peter Zhu
80a71bfb1c Fix typo in test_gc_compact.rb [ci skip] 2025-02-18 18:41:57 -05:00
Peter Zhu
0597cbcb1d Fix crash for special constants in too complex generic ivars
We should skip reference updating for entries in too complex generic ivars
that are special constants. This fixes the following crash:

    MAX_SHAPES = 0x80000

    MAX_SHAPES.times do |i|
      o = []
      o.instance_variable_set(:"@foo#{i}", 1)
    end

    o = []

    o.instance_variable_set(:"@a", 123)

    GC.compact
2025-02-18 17:09:28 -05:00
Burdette Lamar
27ba268b75
[DOC] Tweaks for Hash#empty? 2025-02-18 15:29:27 -05:00
BurdetteLamar
fd134cf6d2 [DOC] Tweaks for Hash#each_value 2025-02-18 15:02:05 -05:00
BurdetteLamar
eafcdc1535 [DOC] Tweaks for Hash#each_key 2025-02-18 10:04:58 -05:00
Misaki Shioi
e9ba334fd1
Tweak: Add prefix to non-static function names (#12764)
to avoid conflicts with other functions.
This was pointed out in https://github.com/ruby/ruby/pull/11653#discussion_r1837356617 , but it was not fixed at that time.
2025-02-18 21:09:06 +09:00
Yusuke Endoh
cfca348436 Add the behavior change of Binding#local_variable* to NEWS.md 2025-02-18 17:49:29 +09:00
Yusuke Endoh
3a0d00ddfb Add a test for Binding#local_variable* with numbered parameters and it 2025-02-18 16:23:24 +09:00
Yusuke Endoh
993fd96ce6 reject numbered parameters from Binding#local_variables
Also, Binding#local_variable_get and #local_variable_set rejects an
access to numbered parameters.

[Bug #20965] [Bug #21049]
2025-02-18 16:23:24 +09:00
Yusuke Endoh
6d75599a1a refactor: make get_local_variable_ptr accept "rb_env_t *"
... instead of "rb_env_t **" because no one uses the updated env.
2025-02-18 16:23:24 +09:00
Martin Emde
39960cd748 [rubygems/rubygems] Reduce confusion about domains used for testing
Sometimes security reports believe they have found a vulnerability
because they find a domain we don't own being used in the rubygems
repository. Though there is nothing vulnerable about using 'fake'
domains in tests when they are never hit, it nonetheless reduces
confusion for everyone if we constrain our test domains to domains
we actually own and control.

https://github.com/rubygems/rubygems/commit/e77ebbe2fc
2025-02-18 12:12:55 +09:00
David Rodríguez
507de2226b [rubygems/rubygems] Fix Bundler incorrectly downgrading direct dependencies
There's no reason to call `converge_specs` when adding additional
lower bound requirements to prevent downgrades, and it actually causes
the extra requirements to be missed sometimes.

Loop over the originally locked specs directly, adding the additional
precaution of not adding the requirement if the Gemfile dependency has
changed and it no longer matches the locked spec.

https://github.com/rubygems/rubygems/commit/5154506912
2025-02-18 12:12:54 +09:00
David Rodríguez
203a570f68 [rubygems/rubygems] Add additional assertions to spec
To make it consistent with the spec above it.

https://github.com/rubygems/rubygems/commit/9a00bf8db9
2025-02-18 12:12:53 +09:00
David Rodríguez
c5cdabc14a [rubygems/rubygems] Don't try to skip requirements to prevent downgrades
These don't really hurt, so I'm not sure why I introduced it.

https://github.com/rubygems/rubygems/commit/85b6b405ac
2025-02-18 12:12:52 +09:00
David Rodríguez
c77354157f [rubygems/rubygems] Fix locked gems being upgraded when locked dependencies are incorrect
Resolver had internal logic to prioritize locked versions when sorting
versions, however part of it was not being actually hit because of how
unlocking worked in the resolver: a package was allow to be unlocked
when that was explicit requested or when the list of unlocks was empty.
That did not make a lot of sense and other cases were working because
the explicit list of unlocks was getting "artificially filled".

Now we consider a package unlocked when explicitly requested (`bundle
update <package>`), or when everything is being unlocked (`bundle
install` with no lockfile or `bundle update`).

This makes things simpler and gets the edge case added as a test case
working as expected.

https://github.com/rubygems/rubygems/commit/b8e55087f0
2025-02-18 12:12:51 +09:00
David Rodríguez
249881690a [rubygems/rubygems] Add intermediate assertion to spec to help debugging
https://github.com/rubygems/rubygems/commit/ffabab65f2
2025-02-18 12:12:50 +09:00
David Rodríguez
592eb02d6c [rubygems/rubygems] Refactor finding dependency changes
https://github.com/rubygems/rubygems/commit/d8c4754d8f
2025-02-18 12:12:49 +09:00
David Rodríguez
63657565eb [rubygems/rubygems] Extract a TheBundle#locked_specs test helper
https://github.com/rubygems/rubygems/commit/8cbe6573b4
2025-02-18 12:12:48 +09:00
David Rodríguez
533e894cb5 [rubygems/rubygems] Improve processing and categorizing unlock information
https://github.com/rubygems/rubygems/commit/516430c3ec
2025-02-18 12:12:48 +09:00
BurdetteLamar
36f69d5b69 [DOC] Tweaks for Hash#dig 2025-02-17 19:09:33 -05:00
BurdetteLamar
266088a85a [DOC] Tweaks for Hash#each_pair 2025-02-17 19:08:14 -05:00
BurdetteLamar
047a05ea43 [DOC] Tweaks for Hash#delete_if 2025-02-17 19:06:22 -05:00
Kevin Newton
2db365dc83 [ruby/prism] Fix escape unicode curly inline whitespace
Fixes [Bug #21145]

https://github.com/ruby/prism/commit/be2d845639
2025-02-17 18:12:03 +00:00
Burdette Lamar
8324e3148a
[DOC] Tweaks for Hash#compact! (#12756) 2025-02-17 11:10:48 -05:00
Nobuyoshi Nakada
657bd31cc7
Trivial optimization
- Not call `strlen` at the end of the zone name.
- Use the initialized UTC string.
2025-02-17 18:27:24 +09:00
Nobuyoshi Nakada
64eba7a01a
Ignore broken git work directory at creating revision.h [ci skip] 2025-02-17 18:25:07 +09:00
Hiroshi SHIBATA
de490a132c Enabled test_gmp_version 2025-02-17 18:08:37 +09:00
Hiroshi SHIBATA
13c64a8a20 Pass XINCFLAGS for gmp build with Windows platform
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2025-02-17 18:08:37 +09:00
Hiroshi SHIBATA
fa5663ea24 Revert "Temporary removed gmp because vcpkg package is broken."
This reverts commit b56b70a373753fd5c6d1b6df911342c8d0138695.
2025-02-17 18:08:37 +09:00
git
929e8131f1 Update bundled gems list as of 2025-02-16 2025-02-17 07:00:27 +00:00
Nobuyoshi Nakada
7032e2d6bc
Check programs for CC in the same path
When the path of `CC` contains the target program name, e.g., clang,
the replaced program names were unexpected.  Replace basename part
only.
2025-02-17 13:19:08 +09:00
Collin Funk
c1c7934b63 [Bug #21128] Include fcntl.h before checking for O_CLOEXEC
On glibc O_CLOEXEC is defined in fcntl.h and not unistd.h so this change
prevents the macro from being redefined.
2025-02-17 13:05:18 +09:00