summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2025-12-17ObjectSpace.{dump,dump_all,dump_shapes} needs vm barrier. (#15569)Luke Gruber
This allows these methods to be called from ractors. Add new exported function `rb_vm_lock_with_barrier()` that requires users to include "vm_sync.h"
2025-12-17[ruby/error_highlight] Show no message when failing to get caller/callee ↵Yusuke Endoh
snippets Even with Ruby 4.0, snippets is not always available, such as in irb by default. It would be better to just say nothing than to show a confusing message. https://github.com/ruby/error_highlight/commit/ef80ce73a1
2025-12-17Revert the default size of Enumerator::Producer to infinityAkinori Musha
[Bug #21780]
2025-12-17Revert the override of Enumerator#to_set that performed size checksAkinori Musha
[Bug #21780]
2025-12-17[ruby/net-http] Freeze more constants for Ractor compatibilityKazuki Yamaguchi
Freeze Net::HTTP::SSL_ATTRIBUTES and IDEMPOTENT_METHODS_. Both constants have been marked as :nodoc:. Together with https://github.com/ruby/openssl/issues/521, this enables HTTPS clients in non-main Ractors on Ruby 4.0. https://github.com/ruby/net-http/commit/f24b3b358b
2025-12-17`Socket.tcp` and `TCPSocket.new` raises `IO::TiemoutError` with user ↵Misaki Shioi
specified timeout (#15602) * `Socket.tcp` and `TCPSocket.new` raises `IO::TiemoutError` with user specified timeout In https://github.com/ruby/ruby/pull/11880, `rsock_connect()` was changed to raise `IO::TimeoutError` when a user-specified timeout occurs. However, when `TCPSocket.new` attempts to connect to multiple destinations, it does not use `rsock_connect()`, and instead raises `Errno::ETIMEDOUT` on timeout. As a result, the exception class raised on timeout could differ depending on whether there were multiple destinations or not. To align this behavior with the implementation of `rsock_connect()`, this change makes `TCPSocket.new` raise `IO::TimeoutError` when a user-specified timeout occurs. Similarly, `Socket.tcp` is updated to raise `IO::TimeoutError` when a timeout occurs within the method. (Note that the existing behavior of `Addrinfo#connect_internal`, which Socket.tcp depends on internally and which raises `Errno::ETIMEDOUT` on timeout, is not changed.) * [ruby/net-http] Raise `Net::OpenTimeout` when `TCPSocket.open` raises `IO::TimeoutError`. With the changes in https://github.com/ruby/ruby/pull/15602, `TCPSocket.open` now raises `IO::TimeoutError` when a user-specified timeout occurs. This change updates #connect to handle this case accordingly. https://github.com/ruby/net-http/commit/f64109e1cf
2025-12-17[Bug #21787] IO::Buffer: Check addition overflowsNobuyoshi Nakada
https://hackerone.com/reports/3437743
2025-12-17IO::Buffer: Fill the test for `IO::Buffer#clear`Nobuyoshi Nakada
2025-12-17Bundle RubyGems 4.0.2 and Bundler 4.0.2Hiroshi SHIBATA
2025-12-16Make tracepoints with set_trace_func or TracePoint.new ractor local (#15468)Luke Gruber
Before this change, GC'ing any Ractor object caused you to lose all enabled tracepoints across all ractors (even main). Now tracepoints are ractor-local and this doesn't happen. Internal events are still global. Fixes [Bug #19112]
2025-12-16Box: fix the class name in testsNobuyoshi Nakada
2025-12-16Box: fix the environment variable nameNobuyoshi Nakada
2025-12-16Box: move extensions from namespace to boxNobuyoshi Nakada
2025-12-16Revert "[Feature #6012] Extend `source_location` for end positionNobuyoshi Nakada
and columns" This reverts commit 073c4e1cc712064e626914fa4a5a8061f903a637. https://bugs.ruby-lang.org/issues/6012#note-31 > we will cancel this feature in 4.0 because of design ambiguities > such as whether to return column positions in bytes or characters as > in [#21783]. [#21783]: https://bugs.ruby-lang.org/issues/21783
2025-12-16[ruby/rubygems] Added assertion for Windows and nmakeHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/be5c4e27d9
2025-12-16[ruby/rubygems] Reset MAKEFLAGS option for build jobs testsHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/09e6031a11
2025-12-16[ruby/rubygems] Allow to specify the number of `make` jobs when installing gems:Edouard CHIN
- Added a new `-j` option to `gem install` and `gem update`. This option allows to specify the number of jobs we pass to `make` when compiling gem with native extensions. By default its the number of processors, but users may want a way to control this. You can use it like so: `gem install json -j8` https://github.com/ruby/rubygems/commit/67aad88ca6
2025-12-15YJIT: Bail out if proc would be stored above stack topRandy Stauner
Fixes [Bug #21266].
2025-12-15[ruby/psych] Check that Data members match exactlyBenoit Daloze
* Fixes https://github.com/ruby/psych/issues/760 https://github.com/ruby/psych/commit/952008c898
2025-12-15[ruby/net-http] Refactor HTTPS testsKazuki Yamaguchi
This contains various improvements in tests for openssl integration: - Remove DHE parameters from test servers. OpenSSL is almost always compiled with ECC support nowadays and will prefer ECDHE over DHE. - Remove an outdated omission for a bug in OpenSSL 1.1.0h released in 2018. None of our CI systems use this specific OpenSSL version. - Use top-level return to skip tests if openssl is unavailable. - Refactor tests for Net::HTTP#verify_callback. https://github.com/ruby/net-http/commit/35c1745a26
2025-12-15[ruby/rubygems] Write gem files atomicallyeileencodes
This change updates `write_binary` to use a new class, `AtomicFileWriter.open` to write the gem's files. This implementation is borrowed from Active Support's [`atomic_write`](https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/file/atomic.rb). Atomic write will write the files to a temporary file and then once created, sets permissions and renames the file. If the file is corrupted - ie on failed download, an error occurs, or for some other reason, the real file will not be created. The changes made here make `verify_gz` obsolete, we don't need to verify it if we have successfully created the file atomically. If it exists, it is not corrupt. If it is corrupt, the file won't exist on disk. While writing tests for this functionality I replaced the `RemoteFetcher` stub with `FakeFetcher` except for where we really do need to overwrite the `RemoteFetcher`. The new test implementation is much clearer on what it's trying to accomplish versus the prior test implementation. https://github.com/ruby/rubygems/commit/0cd4b54291
2025-12-14[ruby/openssl] pkcs7: raise OpenSSL::PKCS7::PKCS7Error in #initializeKazuki Yamaguchi
When d2i_PKCS7_bio() and PEM_read_bio_PKCS7() fail to decode the input, OpenSSL::PKCS7.new currently raises ArgumentError. The usual practice in ruby/openssl where an error originates from the underlying OpenSSL library is to raise OpenSSL::OpenSSLError. Raise OpenSSL::PKCS7::PKCS7Error instead for consistency with OpenSSL::PKCS7.read_smime and all other existing #initialize methods that handle DER/PEM-encoded inputs. https://github.com/ruby/openssl/commit/67a608ce53
2025-12-14ZJIT: Add a test for `--zjit-stats=<path>` optionNobuyoshi Nakada
Fix up ruby/ruby#15414, 29c29c2b7e972359ab83038c5dc27a7e53ae65c7
2025-12-14ZJIT: Fix tests about `--zjit-stats-quiet` optionNobuyoshi Nakada
The `--zjit-stats-quiet` and `--zjit-stats=quiet` options differ. The latter option, `=quiet`, does print stats to the file "quiet", but does not suppress output like yjit option `--yjit-stats=quiet`. Fix up ruby/ruby#15414, 29c29c2b7e972359ab83038c5dc27a7e53ae65c7
2025-12-13[ruby/openssl] ossl.c: implement OpenSSL::OpenSSLError#detailed_messageKazuki Yamaguchi
An OpenSSL function sometimes puts more than one error entry into the thread-local OpenSSL error queue. Currently, we use the highest-level entry for generating the exception message and discard the rest. Let ossl_make_error() capture all current OpenSSL error queue contents into OpenSSL::OpenSSLError#errors and extend OpenSSL::OpenSSLError#detailed_message to include the information. An example: $ ruby -Ilib -ropenssl -e'OpenSSL::X509::ExtensionFactory.new.create_ext("a", "b")' -e:1:in 'OpenSSL::X509::ExtensionFactory#create_ext': a = b: error in extension (name=a, value=b) (OpenSSL::X509::ExtensionError) OpenSSL error queue reported 2 errors: error:11000082:X509 V3 routines:do_ext_nconf:unknown extension name error:11000080:X509 V3 routines:X509V3_EXT_nconf_int:error in extension (name=a, value=b) from -e:1:in '<main>' https://github.com/ruby/openssl/commit/d28f7a9a13
2025-12-13Enumerator.produce accepts an optional `size` keyword argumentAkinori Musha
When not specified, the size is unknown (`nil`). Previously, the size was always `Float::INFINITY` and not specifiable. [Feature #21701]
2025-12-13ZJIT: Nil-fill locals in direct send (#15536)Randy Stauner
Avoid garbage reads from locals in eval. Before the fix the test fails with <"[\"x\", \"x\", \"x\", \"x\"]"> expected but was <"[\"x\", \"x\", \"x\", \"x286326928\"]">.
2025-12-12ZJIT: Don't inline non-parameter localsRandy Stauner
2025-12-12Prevent ifunc procs from being made shareableÉtienne Barrié
[Bug #21775]
2025-12-12Array#rfindKevin Newton
Implement Array#rfind, which is the same as find except from the other side of the Array. Also implemented Array#find (as opposed to the generic one on Enumerable because it is significantly faster and to keep the implementations together. [Feature #21678]
2025-12-12ZJIT: Inline `Hash#[]=`Stan Lo
2025-12-13Fix binding.implicit_parameters_get/defined segfault when wrong name string ↵tomoya ishida
is passed (#15530)
2025-12-12Binding#implicit_parameters, etc. support the implicit "it" parameterYusuke Endoh
[Bug #21049]
2025-12-12Add Binding#implicit_parameters, etc.Yusuke Endoh
This changeset introduces: * `Binding#implicit_parameters` * `Binding#implicit_parameter_get` * `Binding#implicit_parameter_defined?` [Bug #21049]
2025-12-12Avoid race condition in `test_without_handle_interrupt_signal_works`. (#15504)Samuel Williams
2025-12-12[ruby/timeout] Restore original signal handler in test_timeout_in_trap_handlerBenoit Daloze
https://github.com/ruby/timeout/commit/4ae8631acf
2025-12-12Binding#local_variable_defined? raises a NameError for numbered params.Yusuke Endoh
[Bug #21776]
2025-12-12`Binding#local_variable_defined?` must not handle numbered parametersYusuke Endoh
[Bug #21776]
2025-12-12ZJIT: Don't specialize calls with kwsplat (#15513)Randy Stauner
2025-12-11[ruby/timeout] Fix failing timeout testLuke Gruber
``` Run options: "--ruby=./miniruby -I../ruby/lib -I. -I.ext/common ../ruby/tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=../ruby/test/.excludes --name=!/memory_leak/ --seed=9843 [ 1/31] TestTimeout#test_timeout_in_trap_handler = 0.00 s 1) Error: TestTimeout#test_timeout_in_trap_handler: NoMethodError: undefined method 'kill' for nil /Users/luke/workspace/ruby-dev/ruby/test/test_timeout.rb:9:in 'TestTimeout#kill_timeout_thread' /Users/luke/workspace/ruby-dev/ruby/test/test_timeout.rb:424:in 'TestTimeout#test_timeout_in_trap_handler' Finished tests in 2.715032s, 11.4179 tests/s, 52.3014 assertions/s. 31 tests, 142 assertions, 0 failures, 1 errors, 0 skips ruby -v: ruby 4.0.0dev (2025-12-11T21:56:23Z fix_timeout_test https://github.com/ruby/timeout/commit/1c5eacbf9a) +PRISM [arm64-darwin24] make: *** [yes-test-all] Error 1 ``` https://github.com/ruby/timeout/commit/e5bc1de901
2025-12-11[ruby/timeout] Add windows to CI matrixJean Boussier
https://github.com/ruby/timeout/commit/c8d63ce3fe
2025-12-11[ruby/timeout] Skip signal test on windowsJean Boussier
Windows has no SIGUSR1. There might be another usable signal, but this is breaking ruby master so I just want a quick fix for now. https://github.com/ruby/timeout/commit/b19043e8d0
2025-12-11Stop bumping RUBY_PATCHLEVEL in release versions (#15502)Takashi Kokubun
[[Misc #21770]](https://bugs.ruby-lang.org/issues/21770)
2025-12-12Fix Set#^ to not mutate its argument (#15296)Gil Desmarais
* test(set): add test Set#xor does not mutate other_set * Fix Set#^ to not mutate its argument
2025-12-11[ruby/json] Revert "Skip test failing with JRuby in CI"Étienne Barrié
This reverts commit https://github.com/ruby/json/commit/b7e1734d9ca0. https://github.com/ruby/json/commit/5793694ee6
2025-12-11[ruby/timeout] Make Timeout.timeout work in a trap handler on CRubyBenoit Daloze
* Fixes https://github.com/ruby/timeout/issues/17 https://github.com/ruby/timeout/commit/1a499a8f96
2025-12-11[ruby/timeout] Reset the interrupt mask when creating the Timeout threadBenoit Daloze
* Add tests related to Thread.handle_interrupt * Fixes https://github.com/ruby/timeout/issues/41 https://github.com/ruby/timeout/commit/a52720e82a
2025-12-11[ruby/json] Add `allow_control_characters` parsing optionJean Boussier
While it's not allowed by the spec, some parsers like Oj do accept it, and it can be blocking a transition. Having this feature can help people migrate. https://github.com/ruby/json/commit/3459499cb3
2025-12-11[Bug #19558] Allow ASCII range to mix with Unicode dumpNobuyoshi Nakada
2025-12-11[Bug #21712] Allow `.()` call for command with blockyui-knk
This commit allows codes like `a b do end.()` and `a b do end&.()`.