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
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
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
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/775https://github.com/ruby/openssl/commit/71f4fef2fa
* 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>
* 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>
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.
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.
I don't want to make bundled_gems.rb more complex and complicate.
Revert "Fixed warning condition with LoadError"
This reverts commit 3a9e48b9a4.
Revert "Only warn fiddle as optional dependency"
This reverts commit ff3f61556f.
Revert "Only `warn` about bundled gems when require succeeds"
This reverts commit a70adce1ce.
[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.
* 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
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
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.
As of 10574857ce, 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]
Useful for core dumps. It used to not work because:
(gdb) p !""
evaluation of this expression requires the target program to be active
(gdb) p 0 == ""
evaluation of this expression requires the target program to be active