summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-08-21[DOC] Tweaks for Array#bsearchBurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/11395
2024-08-21[PRISM] Implement unused block warningeileencodes
Related: ruby/prism#2935 Notes: Merged: https://github.com/ruby/ruby/pull/11415
2024-08-21Simplify how finalizers are ran at shutdownPeter Zhu
We don't need to build a linked list from the finalizer table and instead we can just run the finalizers by iterating the ST table. This also improves the performance at shutdown, for example: 1_000_000.times.map do o = Object.new ObjectSpace.define_finalizer(o, proc { }) o end Before: Time (mean ± σ): 1.722 s ± 0.056 s [User: 1.597 s, System: 0.113 s] Range (min … max): 1.676 s … 1.863 s 10 runs After: Time (mean ± σ): 1.538 s ± 0.025 s [User: 1.437 s, System: 0.093 s] Range (min … max): 1.510 s … 1.586 s 10 runs
2024-08-21[rubygems/rubygems] Restore support for passing relative paths to `:git`David Rodríguez
The `file://` protocol does not really work with relative paths and it's not necessary anyways. So restore support for that by not using `file://`. https://github.com/rubygems/rubygems/commit/16a68998ce
2024-08-21[rubygems/rubygems] Add missing flag passed to `git fetch`David Rodríguez
Doesn't really change the test outcome, but I noticed it was missing. https://github.com/rubygems/rubygems/commit/ea4f9d5209
2024-08-21[PRISM] Fix up test exception assertion for PrismKevin Newton
2024-08-21Remove unused weakmap field in wmap_foreachPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/11413
2024-08-21[rubygems/rubygems] Fix `gem uninstall <name>:<version>` failing on shadowed ↵David Rodríguez
default gems https://github.com/rubygems/rubygems/commit/29357a5dd6
2024-08-21[rubygems/rubygems] Add better error when trying to develop RubyGems with an ↵David Rodríguez
unsupported Ruby version https://github.com/rubygems/rubygems/commit/9d41c4088a
2024-08-21[rubygems/rubygems] Regeneration previous git application caches that didn't ↵David Rodríguez
include bare repos https://github.com/rubygems/rubygems/commit/417319ecb1
2024-08-21[Bug #20687] Exclude just built ruby as baserubyNobuyoshi Nakada
On Windows, an executable file in the current directory has the priority to the PATH environment variable always.
2024-08-21[Bug #20687] Check if base ruby provides necessary librariesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11419
2024-08-21Don't show script name when bundle exec and call ruby script directly.Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/11418
2024-08-21Skip to show script name with using ruby -r optionHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/11418
2024-08-21Show correct script name with sub-feature caseHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/11418
2024-08-21Reapply "[ruby/uri] Warn compatibility methods in RFC3986_PARSER"Hiroshi SHIBATA
This reverts commit 3da7e440e9fca835f5475a98f1c0afb4d2ac71db. Notes: Merged: https://github.com/ruby/ruby/pull/11416
2024-08-21Skip failing tempfile library testsSoutaro Matsumoto
Notes: Merged: https://github.com/ruby/ruby/pull/11417
2024-08-21Generate parsers of RDoc with Racc 1.8.1Hiroshi SHIBATA
2024-08-21[ruby/logger] Guarantee level_override existsMichael Chui
Some Ruby apps subclass Logger without running the superclass constructor, which means that `@level_override` isn't initialized properly. This can be fixed in some cases, but the gem should maintain backwards compatibility. https://github.com/ruby/logger/commit/3246f38328
2024-08-20[ruby/tempfile] Don't unlink in finalizer when already unlinkedPeter Zhu
https://github.com/ruby/tempfile/commit/f677941ea2
2024-08-20[ruby/tempfile] Fix subprocess tests requiresPeter Zhu
Using `-rtempfile` requires the tempfile built into Ruby, not the currently developed one, so the tests aren't testing this tempfile. https://github.com/ruby/tempfile/commit/ea2dec6f46
2024-08-20Remove dependency on Tempfile::Remover in leakchecker.rbPeter Zhu
2024-08-20[ruby/tempfile] Add FinalizerManager to manage finalizersPeter Zhu
As @jeremyevans pointed out for commit eb2d8b1: > Each Tempfile instance has a separate File instance and file descriptor: > > t = Tempfile.new > t.to_i # => 6 > t.dup.to_i => 7 FinalizerManager will keep track of the open File objects for the particular file and will only unlink the file when all of the File objects have been closed. https://github.com/ruby/tempfile/commit/753ab16642
2024-08-20[ruby/tempfile] Ensure finalizer order in TempfilePeter Zhu
The Closer and Remover finalizers are defined on different objects in Tempfile. The Closer is defined on the Tempfile object while the Remover is defined on the finalizer_obj. This means that there is no guarantee of the finalizer order. On Windows, we must close the file before removing it because we cannot remove an open file. But since the order is not guaranteed, the GC may run the Remover finalizer first, which will fail with an Errno::EACCES (Permission denied @ apply2files). This commit changes it so that both the Closer and Remover finalizers are defined on the finalizer_obj, which guarantees the order that it is ran. https://github.com/ruby/tempfile/commit/eb2d8b1175
2024-08-20Remove extraneous lock filesNobuyoshi Nakada
See https://github.com/rubygems/rubygems/pull/7939
2024-08-20[ruby/reline] typofixHiroshi SHIBATA
https://github.com/ruby/reline/commit/d44fbf9f7b
2024-08-20Rewrite #test_redefinition_mismatch to use a dedicated test classKJ Tsanaktsidis
This test is checking what happens if you try and define a class in a C extension where that constant is already not a class. It was doing this by overriding ::Date and then trying to require 'date. The issue with this is that if we ever add 'date' as a dependency for the test runner, this test will break because the test runner files get implicitly required in an `assert_separately` block. Better use an explicit class for this purpose which can't be accidentally required elsewhere. Notes: Merged: https://github.com/ruby/ruby/pull/11400
2024-08-20Decrease the timeout in assert_darwin_vm_dump_works (#11412)Naoto Ono
Notes: Merged-By: ono-max <[email protected]>
2024-08-20Check compile_branch_condition resultsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11411
2024-08-20Make same structures sameNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11411
2024-08-20Bump github/codeql-action from 3.26.2 to 3.26.3dependabot[bot]
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.2 to 3.26.3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/429e1977040da7a23b6822b13c129cd1ba93dbb2...883d8588e56d1753a8a58c1c86e88976f0c23449) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/11410
2024-08-19Avoid hash allocation for certain proc callsJeremy Evans
Previously, proc calls such as: ```ruby proc{|| }.(**empty_hash) proc{|b: 1| }.(**r2k_array_with_empty_hash) ``` both allocated hashes unnecessarily, due to two separate code paths. The first call goes through CALLER_SETUP_ARG/vm_caller_setup_keyword_hash, and is simple to fix by not duping an empty keyword hash that will be dropped. The second case is more involved, in setup_parameters_complex, but is fixed the exact same way as when the ruby2_keywords hash is not empty, by flattening the rest array to the VM stack, ignoring the last element (the empty keyword splat). Add a flatten_rest_array static function to handle this case. Update test_allocation.rb to automatically convert the method call allocation tests to proc allocation tests, at least for the calls that can be converted. With the code changes, all proc call allocation tests pass, showing that proc calls and method calls now allocate the same number of objects. I've audited the allocation tests, and I believe that all of the low hanging fruit has been collected. All remaining allocations are either caller side: * Positional splat + post argument * Multiple positional splats * Literal keywords + keyword splat * Multiple keyword splats Or callee side: * Positional splat parameter * Keyword splat parameter * Keyword to positional argument conversion for methods that don't accept keywords * ruby2_keywords method called with keywords Reapplies abc04e898b627ab37fa9dd5e330f239768778d8b, which was reverted at d56470a27c5a8a2e7aee7a76cea445c2d29c0c59, with the addition of a bug fix and test. Fixes [Bug #20679] Notes: Merged: https://github.com/ruby/ruby/pull/11409 Merged-By: jeremyevans <[email protected]>
2024-08-20Sort links [ci skip]Kazuhiro NISHIYAMA
2024-08-19[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.100 to 0.9.101. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.100...v0.9.101) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> https://github.com/rubygems/rubygems/commit/3addc2c3e7
2024-08-19[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.100 to 0.9.101. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.100...v0.9.101) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> https://github.com/rubygems/rubygems/commit/d26f5824a7
2024-08-19Make assertions allow incremental GC when disabledPeter Zhu
When assertions are enabled, the following code triggers an assertion error: GC.disable GC.start(immediate_mark: false, immediate_sweep: false) 10_000_000.times { Object.new } This is because the GC.start ignores that the GC is disabled and will start incremental marking and lazy sweeping. But the assertions in gc_marks_continue and gc_sweep_continue assert that GC is not disabled. This commit changes it for the assertion to pass if the GC was triggered from a method. Notes: Merged: https://github.com/ruby/ruby/pull/11391
2024-08-19[ruby/rdoc] Avoid potentially loading the same extension from different ↵David Rodríguez
versions of the same gem Avoids warnings like ``` /path/to/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rbs-3.4.0/lib/rdoc/discover.rb:10: warning: method redefined; discarding old scan /path/to/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/lib/rdoc/discover.rb:10: warning: previous definition of scan was here ``` https://github.com/ruby/rdoc/commit/e47920d8f3
2024-08-19Single letter ASCII operator is same as the corresponding IDNobuyoshi Nakada
2024-08-19Merge `rb_fork_ruby2` into `rb_fork_ruby`Nobuyoshi Nakada
2024-08-19[rubygems/rubygems] Change new gem README template to have copyable code blocksMarco Roth
https://github.com/rubygems/rubygems/commit/c805e9b558
2024-08-18Make Range#step to consistently use + for iteration (#7444)Victor Shepelev
Make Range#step to consistently use + for iteration [Feature #18368] Previously, non-numerics expected step to be integer, and iterated with begin#succ, skipping over step value steps. Since this commit, numeric and non-numeric iteration behaves the same way, by using + operator. Notes: Merged-By: zverok <[email protected]>
2024-08-17[DOC] Add `$;` to the list of deprecated global variablesNeil Carvalho
Notes: Merged: https://github.com/ruby/ruby/pull/11392 Merged-By: nobu <[email protected]>
2024-08-17Update bundled gems list as of 2024-08-16git
2024-08-16Revert "Avoid hash allocation for certain proc calls"Jeremy Evans
This reverts commit abc04e898b627ab37fa9dd5e330f239768778d8b. This caused problems in a Rails test. Notes: Merged: https://github.com/ruby/ruby/pull/11394
2024-08-16Fix assertion error when TracePoint has incompatible eventsPeter Zhu
TracePoints with incompatible events (i.e. events not in ISEQ_TRACE_EVENTS) with a method target will fail an assertion error because it does not filter for the supported events. For example, the following lines will cause an assertion error: def foo; end # No arguments passed into TracePoint.new enables all ISEQ_TRACE_EVENTS TracePoint.new {}.enable(target: method(:foo)) # Raise is not supported with a target TracePoint.new(:raise, :return) {}.enable(target: method(:foo)) foo Crashes with: Assertion Failed: vm_insnhelper.c:7026:vm_trace:(iseq_local_events & ~(0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0020| 0x0040 | 0x0100 | 0x0200 | 0x4000 | 0x010000| 0x020000)) == 0 Notes: Merged: https://github.com/ruby/ruby/pull/11390
2024-08-16[DOC] Tweaks to Array#assoc (#11384)Burdette Lamar
Notes: Merged-By: peterzhu2118 <[email protected]>
2024-08-16[ruby/openssl] Remove test_ed25519_not_approved_on_fips.Jun Aruga
This commit fixes the following failure on OpenSSL master FIPS case. ``` 1) Failure: test_ed25519_not_approved_on_fips(OpenSSL::TestPKey): OpenSSL::PKey::PKeyError expected but nothing was raised. /home/runner/work/openssl/openssl/vendor/bundle/ruby/3.0.0/gems/test-unit-ruby-core-1.0.6/lib/core_assertions.rb:462:in `assert_raise' /home/runner/work/openssl/openssl/test/openssl/test_pkey.rb:174:in `test_ed25519_not_approved_on_fips' 171: MC4CAQAwBQYDK2VwBCIEIEzNCJso/5banbbDRuwRTg9bijGfNaumJNqM9u1PuKb7 172: -----END PRIVATE KEY----- 173: EOF => 174: assert_raise(OpenSSL::PKey::PKeyError) do 175: OpenSSL::PKey.read(priv_pem) 176: end 177: end ``` Because FIPS compliance is a continually moving target. According to the [1], FIPS 140-3 *currently* allows ED25519. The ED25519 is allowed again with the latest OpenSSL FIPS by the commit [2], while it is not allowed in OpenSSL stable version 3.x FIPS. Remove this test because we want to keep our tests stable. [1] https://github.com/openssl/openssl/discussions/22054 [2] https://github.com/openssl/openssl/commit/5f04124aab4a477d4e58149d8f04871ff7e5ea4b https://github.com/ruby/openssl/commit/d43904b834
2024-08-16Speed up finalizers for objects without object IDPeter Zhu
If the object being finalized does not have an object ID, then we don't need to insert into the object ID table, we can simply just allocate a new object ID by bumping the next_object_id counter. This speeds up finalization for objects that don't have an object ID. For example, the following script now runs faster: 1_000_000.times do o = Object.new ObjectSpace.define_finalizer(o) {} end Before: Time (mean ± σ): 1.462 s ± 0.019 s [User: 1.360 s, System: 0.094 s] Range (min … max): 1.441 s … 1.503 s 10 runs After: Time (mean ± σ): 1.199 s ± 0.015 s [User: 1.103 s, System: 0.086 s] Range (min … max): 1.181 s … 1.229 s 10 runs
2024-08-16Revert soname changesRaed Rizqie
- only i386-ucrt soname is changed to fix building on x86 clang - fix detection of x86intrin.h on x86 system - mingw does not have LIBRUBY_SONAME Notes: Merged: https://github.com/ruby/ruby/pull/11362
2024-08-16Stringize VM_ASSERT expression before expansionNobuyoshi Nakada