summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-11-14Update default gems list at 43285f543b4ab12431a21e6b253c65 [ci skip]git
2024-11-14[ruby/pp] Bump up v0.6.1Hiroshi SHIBATA
https://github.com/ruby/pp/commit/812933668d
2024-11-14Update vendored thor to 1.3.2David Rodríguez
2024-11-14Update vendored timeout to 0.4.2David Rodríguez
2024-11-14Update vendored securerandom to 0.3.2David Rodríguez
2024-11-14Update vendored resolv to 0.5.0David Rodríguez
2024-11-14Update vendored net-http to 0.5.0David Rodríguez
2024-11-14Update vendored fileutils to 1.7.3David Rodríguez
2024-11-14Update vendored optparse to 0.6.0David Rodríguez
2024-11-14[rubygems/rubygems] Fix `bin/rake spec:all` taskDavid Rodríguez
Only in CI, if two different test runs are started (like `bin/rake spec:all` does), the second one would not install the dev version of Bundler and would fail to start. This commit makes it work the same locally and in CI. https://github.com/rubygems/rubygems/commit/7a5ca6c40f
2024-11-14[rubygems/rubygems] I don't see how this could happenDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8b6f9b7f05
2024-11-14[rubygems/rubygems] Make sure `bundle viz` specs are actually runDavid Rodríguez
These are marked as realworld, but the realworld workflow file does not install graphviz, so the specs are actually skipped. These are not actually realworld, so remove that tag. Now they'll be run together with the reset of specs in the standard workflow file, which does install `graphviz`. https://github.com/rubygems/rubygems/commit/e865fcaa22
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] pkcs7: fix memory leak in error path of PKCS7.new and .read_smimeKazuki Yamaguchi
A follow-up to commit https://github.com/ruby/openssl/commit/27e11f2d1dcd and https://github.com/ruby/openssl/commit/07eceb7f6326. The PKCS7 object must be freed before raising an exception. https://github.com/ruby/openssl/commit/172eee4665
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/json] Only use the key cache if the Hash is in an ArrayJean Boussier
Otherwise the likeliness of seeing that key again is really low, and looking up the cache is just a waste. Before: ``` == Parsing small hash (65 bytes) ruby 3.4.0dev (2024-11-13T12:32:57Z fstr-update-callba.. https://github.com/ruby/json/commit/9b44b455b3) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- json 343.049k i/100ms oj 213.943k i/100ms Oj::Parser 31.583k i/100ms rapidjson 303.433k i/100ms Calculating ------------------------------------- json 3.704M (± 1.5%) i/s (270.01 ns/i) - 18.525M in 5.003078s oj 2.200M (± 1.1%) i/s (454.46 ns/i) - 11.125M in 5.056526s Oj::Parser 285.369k (± 4.8%) i/s (3.50 μs/i) - 1.453M in 5.103866s rapidjson 3.216M (± 1.6%) i/s (310.95 ns/i) - 16.082M in 5.001973s Comparison: json: 3703517.4 i/s rapidjson: 3215983.0 i/s - 1.15x slower oj: 2200417.1 i/s - 1.68x slower Oj::Parser: 285369.1 i/s - 12.98x slower == Parsing test from oj (258 bytes) ruby 3.4.0dev (2024-11-13T12:32:57Z fstr-update-callba.. https://github.com/ruby/json/commit/9b44b455b3) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- json 54.539k i/100ms oj 41.473k i/100ms Oj::Parser 24.064k i/100ms rapidjson 51.466k i/100ms Calculating ------------------------------------- json 549.386k (± 1.6%) i/s (1.82 μs/i) - 2.781M in 5.064316s oj 417.003k (± 1.3%) i/s (2.40 μs/i) - 2.115M in 5.073047s Oj::Parser 226.500k (± 4.7%) i/s (4.42 μs/i) - 1.131M in 5.005466s rapidjson 526.124k (± 1.0%) i/s (1.90 μs/i) - 2.676M in 5.087176s Comparison: json: 549385.6 i/s rapidjson: 526124.3 i/s - 1.04x slower oj: 417003.4 i/s - 1.32x slower Oj::Parser: 226500.4 i/s - 2.43x slower ``` After: ``` == Parsing small hash (65 bytes) ruby 3.4.0dev (2024-11-13T12:32:57Z fstr-update-callba.. https://github.com/ruby/json/commit/9b44b455b3) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- json 361.394k i/100ms oj 217.203k i/100ms Oj::Parser 28.855k i/100ms rapidjson 303.404k i/100ms Calculating ------------------------------------- json 3.859M (± 2.9%) i/s (259.13 ns/i) - 19.515M in 5.061302s oj 2.191M (± 1.6%) i/s (456.49 ns/i) - 11.077M in 5.058043s Oj::Parser 315.132k (± 7.1%) i/s (3.17 μs/i) - 1.587M in 5.065707s rapidjson 3.156M (± 4.0%) i/s (316.88 ns/i) - 15.777M in 5.008949s Comparison: json: 3859046.5 i/s rapidjson: 3155778.5 i/s - 1.22x slower oj: 2190616.0 i/s - 1.76x slower Oj::Parser: 315132.4 i/s - 12.25x slower == Parsing test from oj (258 bytes) ruby 3.4.0dev (2024-11-13T12:32:57Z fstr-update-callba.. https://github.com/ruby/json/commit/9b44b455b3) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- json 55.682k i/100ms oj 40.343k i/100ms Oj::Parser 25.119k i/100ms rapidjson 51.500k i/100ms Calculating ------------------------------------- json 555.808k (± 1.4%) i/s (1.80 μs/i) - 2.784M in 5.010092s oj 412.283k (± 1.7%) i/s (2.43 μs/i) - 2.098M in 5.089900s Oj::Parser 279.306k (±13.3%) i/s (3.58 μs/i) - 1.356M in 5.022079s rapidjson 517.177k (± 2.7%) i/s (1.93 μs/i) - 2.626M in 5.082352s Comparison: json: 555808.3 i/s rapidjson: 517177.1 i/s - 1.07x slower oj: 412283.2 i/s - 1.35x slower Oj::Parser: 279306.5 i/s - 1.99x slower ``` https://github.com/ruby/json/commit/00c45ddc9f
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
2024-11-14Fix the method name in a comment [ci skip]Nobuyoshi Nakada
2024-11-14Update action.yml - fix typo [ci skip]John Bampton
Notes: Merged: https://github.com/ruby/ruby/pull/12079 Merged-By: nobu <nobu@ruby-lang.org>
2024-11-13YJIT: Add inline_block_count stat (#12081)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2024-11-13Add a comment about Integer#downto EnumeratorTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/12074
2024-11-13Move Array#map to RubyTakashi Kokubun
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/12074
2024-11-13Move Array#select to RubyTakashi Kokubun
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/12074
2024-11-13Move Integer#downto to RubyTakashi Kokubun
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/12074
2024-11-13YJIT: Specialize `String#[]` (`String#slice`) with fixnum arguments (#12069)Randy Stauner
* YJIT: Specialize `String#[]` (`String#slice`) with fixnum arguments String#[] is in the top few C calls of several YJIT benchmarks: liquid-compile rubocop mail sudoku This speeds up these benchmarks by 1-2%. * YJIT: Try harder to get type info for `String#[]` In the large generated code of the mail gem the context doesn't have the type info. In that case if we peek at the stack and add a guard we can still apply the specialization and it speeds up the mail benchmark by 5%. Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Takashi Kokubun (k0kubun) <takashikkbn@gmail.com> --------- Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Takashi Kokubun (k0kubun) <takashikkbn@gmail.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2024-11-13[ruby/rdoc] Split list of class and instance methods in twoAlexis Bernard
(https://github.com/ruby/rdoc/pull/1206) Looking for a method is easier because eyes don't have to skip dashes or double colon. https://github.com/ruby/rdoc/commit/6852567640
2024-11-13Mark strings returned by Symbol#to_s as chilled (#12065)Jean byroot Boussier
* Use FL_USER0 for ELTS_SHARED This makes space in RString for two bits for chilled strings. * Mark strings returned by `Symbol#to_s` as chilled [Feature #20350] `STR_CHILLED` now spans on two user flags. If one bit is set it marks a chilled string literal, if it's the other it marks a `Symbol#to_s` chilled string. Since it's not possible, and doesn't make much sense to include debug info when `--debug-frozen-string-literal` is set, we can't include allocation source, but we can safely include the symbol name in the warning message, making it much easier to find the source of the issue. Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com> --------- Co-authored-by: Étienne Barrié <etienne.barrie@gmail.com> Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-11-13string.c: preserve coderange when interning a stringJean Boussier
Since `str_do_hash` will most likely scan the string to compute the coderange, we might as well copy it over in the interned string in case it's useful later. Notes: Merged: https://github.com/ruby/ruby/pull/12077
2024-11-13string.c: Directly create strings with the correct encodingJean Boussier
While profiling msgpack-ruby I noticed a very substantial amout of time spent in `rb_enc_associate_index`, called by `rb_utf8_str_new`. On that benchmark, `rb_utf8_str_new` is 33% of the total runtime, in big part because it cause GC to trigger often, but even then `5.3%` of the total runtime is spent in `rb_enc_associate_index` called by `rb_utf8_str_new`. After closer inspection, it appears that it's performing a lot of safety check we can assert we don't need, and other extra useless operations, because strings are first created and filled as ASCII-8BIT and then later reassociated to the desired encoding. By directly allocating the string with the right encoding, it allow to skip a lot of duplicated and useless operations. After this change, the time spent in `rb_utf8_str_new` is down to `28.4%` of total runtime, and most of that is GC. Notes: Merged: https://github.com/ruby/ruby/pull/12076
2024-11-13Move `Symbol#name` into `symbol.rb`Jean Boussier
This allows to declare it as leaf just like `Symbol#to_s`. Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2024-11-13[rubygems/rubygems] Include original error when openssl fails to loadDavid Rodríguez
https://github.com/rubygems/rubygems/commit/440343b791
2024-11-13Revert force_activate feature. It's unnecessary for Ruby 3.4.Hiroshi SHIBATA
I will add this feature for Ruby 3.5 again.
2024-11-13[ruby/openssl] make bn shareable when frozenHoneyryderChuck
https://github.com/ruby/openssl/commit/d3c8e661e8
2024-11-13[CI] add GCC 14卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/12073
2024-11-13[ruby/uri] Remove rakelib/ dir from gem alsoOrien Madgwick
https://github.com/ruby/uri/commit/a0dd612e90
2024-11-13[ruby/uri] Remove unused files from the gem packageOrien Madgwick
https://github.com/ruby/uri/commit/f0847c266c
2024-11-13We can't handle optional dependency without new API of Rubygems.Hiroshi SHIBATA
I don't want to make bundled_gems.rb more complex and complicate. Revert "Fixed warning condition with LoadError" This reverts commit 3a9e48b9a4860022f43d8101c0f3249299437886. Revert "Only warn fiddle as optional dependency" This reverts commit ff3f61556fb62d12d57d017f4c54f1a8fd5208be. Revert "Only `warn` about bundled gems when require succeeds" This reverts commit a70adce1ce5fae8eaae385214ac0d2e7d17c1103. Notes: Merged: https://github.com/ruby/ruby/pull/12072
2024-11-13Bump github/codeql-action from 3.27.1 to 3.27.3dependabot[bot]
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.1 to 3.27.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/4f3212b61783c3c68e8309a0f18a699764811cda...396bb3e45325a47dd9ef434068033c6d5bb0d11a) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/12071
2024-11-12ObjectSpace.dump: handle Module#set_temporary_nameJean Boussier
[Bug #20892] Until the introduction of that method, it was impossible for a Module name not to be valid JSON, hence it wasn't going through the slower escaping function. This assumption no longer hold. Notes: Merged: https://github.com/ruby/ruby/pull/12067
2024-11-12[ruby/prism] Use RbConfig to locate libprism and headers when it is a ↵Benoit Daloze
default gem * This is notably necessary on TruffleRuby, which is updating to Ruby 3.3 which introduces Prism as a default gem. * Using the existing path is not an option as it would end up in truffleruby/lib/build/libprism.so and "truffleruby/lib/include/#{header}" which are not good places for such files. https://github.com/ruby/prism/commit/5d16473e69
2024-11-12[ruby/prism] Fix use of uninitialized value when parsing regexpPeter Zhu
Parsing the regexp /\A{/ causes uses an uninitialized value because it tries to parse it as a range quantifier, so it reads the character after the closing curly bracket. This is using uninitialized values because prism strings are not null terminated. This can be seen in the Valgrind output: ==834710== Conditional jump or move depends on uninitialised value(s) ==834710== at 0x5DA010: pm_regexp_parse_range_quantifier (regexp.c:163) ==834710== by 0x5DA010: pm_regexp_parse_quantifier (regexp.c:243) ==834710== by 0x5DAD69: pm_regexp_parse_expression (regexp.c:738) ==834710== by 0x5DAD69: pm_regexp_parse_pattern (regexp.c:761) ==834710== by 0x5DAD69: pm_regexp_parse (regexp.c:773) ==834710== by 0x5A2EE7: parse_regular_expression_named_captures (prism.c:20886) ==834710== by 0x5A2EE7: parse_expression_infix (prism.c:21388) ==834710== by 0x5A5FA5: parse_expression (prism.c:21804) ==834710== by 0x5A64F3: parse_statements (prism.c:13858) ==834710== by 0x5A9730: parse_program (prism.c:22011) ==834710== by 0x576F0D: parse_input_success_p (extension.c:1062) ==834710== by 0x576F0D: parse_success_p (extension.c:1084) This commit adds checks for the end of the string to pm_regexp_parse_range_quantifier. https://github.com/ruby/prism/commit/be6cbc23ef
2024-11-12Allow Net::HTTP#request to raise Net::OpenTimeout (#12062)Misaki Shioi
with a TCPSoerver that is only listening to avoid AssertionFailedError on Ubuntu. --- The tests such as `TestNetHTTP_v1_2_chunked#test_timeout_during_non_chunked_streamed_HTTP_session_write` expect to raise a `Net::WriteTimeout` due to a failure in writing to the server. However, on Ubuntu environments, the server immediately returns a "Connection Refused" in such cases. The socket created with `TCPSocket.new` that supports HEv2 catches this immediately and raises a `Net::OpenTimeout`. As a result, these tests fail due to raising a different exception than expected. This PR adds `Net::OpenTimeout` asexceptions to avoid these test failures. Notes: Merged-By: shioimm <shioi.mm@gmail.com>
2024-11-12[rubygems/rubygems] Update SPDX license list as of 2024-08-19License Update
https://github.com/rubygems/rubygems/commit/5a094cbfab
2024-11-12Add missing macros for `__has_builtin`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12060
2024-11-11Fix regex timeout double-free after stack_doubleJohn Hawthorn
As of 10574857ce167869524b97ee862b610928f6272f, it's possible to crash on a double free due to `stk_alloc` AKA `msa->stack_p` being freed twice, once at the end of match_at and a second time in `FREE_MATCH_ARG` in the parent caller. Fixes [Bug #20886] Notes: Merged: https://github.com/ruby/ruby/pull/12030
2024-11-12Update default gems list at da151ab1e7ff62d55b16d677a74f0a [ci skip]git
2024-11-12[ruby/io-console] Bump up v0.8.0.beta1Hiroshi SHIBATA
https://github.com/ruby/io-console/commit/8ec27d403e
2024-11-12[ruby/io-console] Update license files same as ruby/rubyHiroshi SHIBATA
https://github.com/ruby/io-console/commit/c9e3f44268