summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-11-26[rubygems/rubygems] [SpecFetcher] If candidates include {name}-ruby or ↵Ellen Marie Dash
ruby-{name}, recommend those. https://github.com/rubygems/rubygems/commit/d7d33172c1
2024-11-26Optimize instructions when creating an array just to call `include?` (#12123)Randy Stauner
* Add opt_duparray_send insn to skip the allocation on `#include?` If the method isn't going to modify the array we don't need to copy it. This avoids the allocation / array copy for things like `[:a, :b].include?(x)`. This adds a BOP for include? and tracks redefinition for it on Array. Co-authored-by: Andrew Novoselac <andrew.novoselac@shopify.com> * YJIT: Implement opt_duparray_send include_p Co-authored-by: Andrew Novoselac <andrew.novoselac@shopify.com> * Update opt_newarray_send to support simple forms of include?(arg) Similar to opt_duparray_send but for non-static arrays. * YJIT: Implement opt_newarray_send include_p --------- Co-authored-by: Andrew Novoselac <andrew.novoselac@shopify.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2024-11-26[ruby/reline] KeyStroke handles multibyte charactertomoya ishida
(https://github.com/ruby/reline/pull/713) https://github.com/ruby/reline/commit/5a8da85f2b
2024-11-26[ruby/irb] Fix indentation of xstring literaltomoya ishida
(https://github.com/ruby/irb/pull/1038) Fixes indent calculation of this input ``` if false p `ls` end ``` https://github.com/ruby/irb/commit/4217a46f5d
2024-11-26[ruby/uri] Suppress deprecate warning of test class (retry)Yusuke Endoh
(https://github.com/ruby/uri/pull/140) A follow-up to https://github.com/ruby/uri/commit/bd2e4be9d0fa Also, leave a comment that the use of `URI::REGEXP` is intentional https://github.com/ruby/uri/commit/bdf765e44a
2024-11-26JSON::GeneratorError expose invalid objectJean Boussier
Fix: https://github.com/ruby/json/issues/710 Makes it easier to debug why a given tree of objects can't be dumped as JSON. Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2024-11-26[ruby/json] JSON.dump: write directly into the provided IOJean Boussier
Ref: https://github.com/ruby/json/issues/524 Rather than to buffer everything in memory. Unfortunately Ruby doesn't provide an API to write into and IO without first allocating a string, which is a bit wasteful. https://github.com/ruby/json/commit/f017af6c0a
2024-11-26[ruby/uri] Suppress deprecate warning of test class and use ↵Hiroshi SHIBATA
EnvUtil.suppress_warning. https://github.com/ruby/uri/commit/bd2e4be9d0
2024-11-26[ruby/uri] Revert "Prevent a warning: URI::REGEXP is obsoleteHiroshi SHIBATA
(https://github.com/ruby/uri/pull/138)" This reverts commit https://github.com/ruby/uri/commit/c00726a20a00. https://github.com/ruby/uri/commit/22f5a7a790
2024-11-26Many of Oniguruma functions need valid encoding stringsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12169
2024-11-26Check negative integer underflowNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12169
2024-11-26[ruby/resolv] Omit Windows and MinGW platforms with with_udp_and_tcpHiroshi SHIBATA
https://github.com/ruby/resolv/actions/runs/12021339854/job/33511655994?pr=64 ``` => 705: with_udp_and_tcp('127.0.0.1', 0) do |u1, t1| 706: with_udp_and_tcp('127.0.0.1', 0) do |u2,t2| 707: u2.close # XXX: u2 UDP socket is not used, but using #with_udp_and_tcp to enable Windows EACCES workaround 708: _, server1_port, _, server1_address = u1.addr Error: Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 55685 ``` https://github.com/ruby/ruby/actions/runs/12005069051/job/33461068529?pr=12161 ``` 1) Error: TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback: Errno::EACCES: Permission denied - bind(2) for "127.0.0.1" port 50676 D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer#initialize' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TCPServer.new' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:78:in 'TestResolvDNS#with_udp_and_tcp' D:/a/ruby/ruby/src/test/resolv/test_dns.rb:705:in 'TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback' ``` https://github.com/ruby/resolv/commit/05765df178
2024-11-26[ruby/resolv] _1 is not provided in Ruby 2.5Hiroshi SHIBATA
https://github.com/ruby/resolv/commit/83f18e2a49
2024-11-25[rubygems/rubygems] Bump the rb-sys group across 2 directories with 1 updatedependabot[bot]
Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib directory: [rb-sys](https://github.com/oxidize-rb/rb-sys). Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example directory: [rb-sys](https://github.com/oxidize-rb/rb-sys). Updates `rb-sys` from 0.9.102 to 0.9.103 - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.102...v0.9.103) Updates `rb-sys` from 0.9.102 to 0.9.103 - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.102...v0.9.103) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rb-sys - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rb-sys ... Signed-off-by: dependabot[bot] <support@github.com> https://github.com/rubygems/rubygems/commit/31b8a68dd5
2024-11-25[ruby/reline] Fix tab completion appending quotetomoya ishida
(https://github.com/ruby/reline/pull/782) https://github.com/ruby/reline/commit/cbf213291c
2024-11-25[rubygems/rubygems] Prevent a warning: net/http: Content-Type did not setYusuke Endoh
`make test-all RUBYOPT=-w` in the ruby/ruby repo printed the warning. This change prevents the warning by specifying the content-type explicitly. A follow-up to https://github.com/rubygems/rubygems/commit/b70c1bb1503d https://github.com/rubygems/rubygems/commit/d573af07f6
2024-11-25[ruby/open-uri] Use `ENV.update`Nobuyoshi Nakada
https://github.com/ruby/open-uri/commit/04067e54b9
2024-11-25[ruby/uri] Prevent a warning: URI::REGEXP is obsoleteYusuke Endoh
(https://github.com/ruby/uri/pull/138) https://github.com/ruby/uri/commit/c00726a20a
2024-11-25Prevent a warning: setting Encoding.default_externalYusuke Endoh
2024-11-25Do not save the last error without sockets in the connection attempt (#12153)Misaki Shioi
* Do not save the last_error if there are no sockets waiting to be connected In this implementation, the results of both name resolution and connection attempts are awaited using select(2). When it returned, the implementation attempted to check for connections even if there were no sockets currently attempting to connect, treating the absence of connected sockets as a connection failure. With this fix, it will no longer check for connections when there are no sockets waiting to be connected. Additionally, the following minor fixes have been made: * Handle failure of getsockopt(2) and removed unnecessary continue in the loop * Tweak: Use common API to check in_progress_fds * Safely call TCPServer.new in test * Set empty writefds when there is no socket waiting to be connected * Enable fast_fallback option Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-11-25Removed redundant argument at Reline::LineEditor::CompletionBlockTestHiroshi SHIBATA
2024-11-24[ruby/reline] Fix completion quote, preposing and target calculationtomoya ishida
bug (https://github.com/ruby/reline/pull/763) https://github.com/ruby/reline/commit/d3ba7216eb
2024-11-23Ensure fiber scheduler re-acquires mutex when interrupted from sleep. (#12158)Samuel Williams
[Bug #20907] Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2024-11-22[ruby/openssl] Support signing CRLs using Ed25519Josh Cooper
Allow CRLs to be signed using Ed25519 private keys by passing a nil digest. https://github.com/ruby/openssl/commit/b62375bcde
2024-11-22[ruby/openssl] Support signing requests using Ed25519Josh Cooper
Allow requests to be signed using Ed25519 private keys by passing a nil digest. This is similar to commit https://github.com/ruby/openssl/commit/b0fc10009120 when signing certs. Calling PKey#public_key is deprecated and does not work for Ed25519. The same can be accomplished by passing the private key. https://github.com/ruby/openssl/commit/d96090320d
2024-11-22[ruby/openssl] Check for compatible openssl versions earlierJosh Cooper
test_pkey wasn't checking for libressl as is done elsewhere. Note the libressl version check is different when testing pkey, because PKey#sign relies on EVP_PKey_sign, whereas signing an X509 cert/request/crl relies on ASN1_item_sign. https://github.com/ruby/openssl/commit/f1db5c88a2
2024-11-21[prism/compiler] end_cursor should never be NULLMatt Valentine-House
This fixes a failed assertion reported to SimpleCov https://github.com/simplecov-ruby/simplecov/issues/1113 This can be repro'd as follows: 1. Create a file `test.rb` containing the following code ``` @foo&.(@bar) ``` 2. require it with branch coverage enabled ``` ruby -rcoverage -e "Coverage.start(branches: true); require_relative 'test.rb'" ``` The assertion is failing because the Prism compiler is incorrectly detecting the start and end cursor position of the call site for the implicit call .() This patch replicates the parse.y behaviour of setting the default end_cursor to be the final closing location of the call node. This behaviour can be verified against `parse.y` by modifying the test command as follows: ``` ruby --parser=parse.y -rcoverage -e "Coverage.start(branches: true); require_relative 'test.rb'" ``` [Bug #20866] Notes: Merged: https://github.com/ruby/ruby/pull/12130
2024-11-20[ruby/zlib] Don't call `rb_str_set_len` while released the GVL.Samuel Williams
(https://github.com/ruby/zlib/pull/88) * Only release the GVL where necessary. - Several string manipulation methods were invoked while the GVL was released. This is unsafe. - The mutex protecting multi-threaded access was not covering buffer state manipulation, leading to data corruption and out-of-bounds writes. - Using `rb_str_locktmp` prevents changes to buffer while it's in use. [Bug #20863] https://github.com/ruby/zlib/commit/e445cf3c80
2024-11-20[rubygems/rubygems] Add --attestation option to gem pushSamuel Giddins
Signed-off-by: Samuel Giddins <segiddins@segiddins.me> https://github.com/rubygems/rubygems/commit/a5412d9a0e
2024-11-20[ruby/psych] Eagerly require `date`.Thierry Deo
https://github.com/ruby/psych/commit/b2aa0032c0
2024-11-20Fix a bug in rb_include_module that stops nested inclusion into module ↵Jeremy Evans
subclasses This bug was present since the code was originally added by me in 3556a834a2847e52162d1d3302d4c64390df1694. Fixes [Bug #20871] Notes: Merged: https://github.com/ruby/ruby/pull/12125
2024-11-20Introduce `Fiber::Scheduler#blocking_operation_wait`. (#12016)Samuel Williams
Redirect `rb_nogvl` blocking operations to the fiber scheduler if possible to prevent stalling the event loop. [Feature #20876] Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2024-11-19[ruby/pp] Fix pretty printing range begin/end with false or niltompng
https://github.com/ruby/pp/commit/6d9c0f255a
2024-11-19[ruby/irb] Don't use delegator to install helper methods to maintomoya ishida
object (https://github.com/ruby/irb/pull/1031) IRB used delegator to install command as a method of frozen main object. Command is not a method now. We can drop it. https://github.com/ruby/irb/commit/2f1c593801
2024-11-19Remove deprecated method Refinement#refined_classShugo Maeda
[Feature #20901] Notes: Merged: https://github.com/ruby/ruby/pull/12115
2024-11-19[Bug #20900] Warn deprecated constant when removingNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12114
2024-11-18[ruby/rdoc] Extract excerpt from raw pages correctlyStan Lo
(https://github.com/ruby/rdoc/pull/1200) Fixes https://bugs.ruby-lang.org/issues/20862 https://github.com/ruby/rdoc/commit/3c678249e2
2024-11-15Disable HEv2 tests temporarily (#12097)Misaki Shioi
* Disable HEv2 tests temporarily To suppress error log output in CI. They should have been DISABLE in PR #12070. --- Additionally, the following fixes have been made: - Remove unnecessary `assert_separately` from the related tests Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-11-15Make fast_fallback option false by default temporarily (#12070)Misaki Shioi
to suppress failing output in CI. Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-11-14[rubygems/rubygems] Update test_project_sanity.rbDave Corson-Knowles
https://github.com/rubygems/rubygems/commit/279eefb8a3
2024-11-14[ruby/reline] Drop loading terminfo, remove fiddle dependency intomoya ishida
non-windows environment. (https://github.com/ruby/reline/pull/769) Reline works perfectly in most major terminal emulators without terminfo. In minor/old terminal emulator, we used to get key bindings from terminfo, but I think it is not used so much. https://github.com/ruby/reline/commit/3ceba3bff7
2024-11-15Do not wait connection attempt delay without in progress fds (#12087)Misaki Shioi
Do not wait Connection Attempt Delay without in progress fds Reset Connection Attempt Delay when connection fails and there is no other socket connection in progress. This is intended to resolve an issue that was temporarily worked around in Pull Request #12062. `TCPServer::new` (used in tests such as `TestNetHTTP_v1_2_chunked#test_timeout_during_non_chunked_streamed_HTTP_session_write`) can only connect over either IPv6 or IPv4, depending on the environment. Since HEv2 attempts to connect over IPv6 first, environments where IPv6 connections are unavailable return ECONNREFUSED immediately. In such cases, the client should immediately retry the connection over IPv4. However, HEv2 includes a specification for a "Connection Attempt Delay," where it waits 250ms after the previous connection attempt before starting the next one. This delay causes Net::OpenTimeout (100ms) to be exceeded while waiting for the next connection attempt to start. With this change, when a connection attempt fails, if there are sockets still attempting to connect and there are addresses yet to be tried, the Connection Attempt Delay will be resetted, allowing the next connection attempt to start immediately. --- Additionally, the following minor fixes have been made: - The `nfds` value used for select(2) is now reset with each wait. Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-11-14rb_raise when attempting to set the GC implementation nameMatt Valentine-House
Instead of silently ignoring the key, we should raise to clearly tell the user that this key is read-only. Notes: Merged: https://github.com/ruby/ruby/pull/11872
2024-11-14Include the currently active GC in RUBY_DESCRIPTIONMatt Valentine-House
This will add +MOD_GC to the version string and Ruby description when Ruby is compiled with shared gc support. When shared GC support is compiled in and a GC module has been loaded using RUBY_GC_LIBRARY, the version string will include the name of the currently active GC as reported by the rb_gc_active_gc_name function in the form +MOD_GC[gc_name] [Feature #20794] Notes: Merged: https://github.com/ruby/ruby/pull/11872
2024-11-14Expose GC.config[:implementation], to query the currently active GCMatt Valentine-House
And a default and readonly key to the GC.config hash that names the current GC implementation. This is provided by each implementation by the API function rb_gc_impl_active_gc_name Notes: Merged: https://github.com/ruby/ruby/pull/11872
2024-11-14asn1: fix ObjectId#==Kazuki Yamaguchi
Compare by the dotted decimal notation rather than the NID. OpenSSL::ASN1::ObjectId can store OIDs that are not registered in OpenSSL's internal table. NID is not defined for such an OID, but it is not an error. The == method also should not raise TypeError if the other object is not an instance of OpenSSL::ASN1::ObjectId. Fixes: https://github.com/ruby/openssl/issues/791
2024-11-14[ruby/openssl] x509: fix handling of multiple URIs in Certificate#crl_urisKazuki Yamaguchi
The implementation of OpenSSL::X509::Certificate#crl_uris makes the assumption that each DistributionPoint in the CRL distribution points extension contains a single general name of type URI. This is not guaranteed by RFC 5280. A DistributionPoint may contain zero or more than one URIs. Let's include all URIs found in the extension. If only non-URI pointers are found, return nil. Fixes: https://github.com/ruby/openssl/issues/775 https://github.com/ruby/openssl/commit/71f4fef2fa
2024-11-14[ruby/openssl] test_x509cert.rb: break up test_extension into smaller unitsKazuki Yamaguchi
test_extesion is testing too many features at once and is hard to navigate. Let's split each chunk apart for more clarity. https://github.com/ruby/openssl/commit/461cfcb070
2024-11-14[ruby/uri] Removed duplicated declare step for constants under the ↵Hiroshi SHIBATA
URI::RFC2396_REGEXP::PATTERN https://github.com/ruby/uri/commit/60a8bc1575
2024-11-14[ruby/uri] Restore constants like URI::REGEXP::PATTERN::IPV6ADDRHiroshi SHIBATA
https://github.com/ruby/uri/commit/ee9a38701a