Previously, since the opt_aset_with optimization was introduced,
use of the opt_aset_with optimization inside multiple assignment
would result in a segfault or incorrect instructions.
Fixes [Bug #21012]
Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com>
When the inner code cannot represent the name of the locals in the
outer code, do not bother putting them into the constant pool as
they will not be referenced.
Fixes [Bug #20992]
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
The iseq location object has a slot for node ids. parse.y was correctly
populating that field but Prism was not. This commit populates the field
with the ast node id for that iseq
[Bug #21014]
Prism shoudld throw a syntax error for endless methods when the method
name uses brackets. Previously it would not. This matches the behavior
of parse.y.
Fixes https://bugs.ruby-lang.org/issues/2101043c16a89ef
When these test cases were written, we did not know the exact OpenSSL
and LibreSSL version number in which they would be implemented. Now that
we know it, we can use that information to ensure the tests are run
whenever they should be.
- OpenSSL 1.1.0 added X25519 support
- OpenSSL 1.1.1 added Ed25519 support and
EVP_PKEY_new_raw_private_key()
- LibreSSL 3.7.0 added X25519 and Ed25519 support in EVP_PKEY and
EVP_PKEY_new_raw_private_key()
- LibreSSL 3.8.1 allowed ASN1_item_sign() to use Ed25519
6cb6663c91
test/openssl/fixtures/pkey/p256_too_large.pem and p384_invalid.pem are
invalid keys where the encoded public key doesn't match the private key.
They are only useful for test cases for OpenSSL::PKey::EC#check_key and
will not be reused elsewhere. Let's directly include the PEM encoding
as a heredoc for clarity.
p384_invalid.pem is dropped because it is redundant.
2f807ff30f
Remove files from test/openssl/fixtures/pkey/ which are not pkeys.
The test cases for OpenSSL::X509::Certificate.load_file can simply use
issue_cert and Tempfile.
11216b8bec
code
(https://github.com/ruby/reline/pull/800)
* Remove invalid encoding string "\M-[char]" from test code, remove unused code/arg/options
* Omit unicode unnoralized input test in non-utf8 testcase
* Remove helper method and constant no longer used in testcode
* Change key binding test to use realistic bytes instead of invalid byte sequence
* Remove invalid byte sequence input from rendering test
yamatanooroti handles invalid byte sequence input "\M-[char]" and converts it to "\e[char]"
We don't need to use these invalid byte sequence and rely on the hack implemented in yamatanooroti
f09e7b154c
Parsing `-> do it end` in parse.y leaks memory. We can see this in the
Valgrind output:
56 bytes in 1 blocks are definitely lost in loss record 1 of 6
at 0x484E0DC: calloc (vg_replace_malloc.c:1675)
by 0x188970: calloc1 (default.c:1472)
by 0x188970: rb_gc_impl_calloc (default.c:8208)
by 0x188970: ruby_xcalloc_body (gc.c:4598)
by 0x18B8BC: ruby_xcalloc (gc.c:4592)
by 0x21DCCA70: new_locations_lambda_body (ripper.y:12844)
by 0x21DCCA70: ripper_yyparse (ripper.y:5194)
by 0x21DDA521: rb_ruby_ripper_parse0 (ripper.y:15798)
There are warnings emitted from test_flip2_locations and test_flip3_locations.
This commit changes ast_parse to suppress all warnings.
warning: integer literal in flip-flop
warning: string literal in flip-flop
Previously, the code for dropping surplus arguments when yielding
into blocks erroneously attempted to drop keyword arguments when there
is in fact no surplus arguments. Fix the condition and test that
supplying the exact number of keyword arguments as require compiles
without fallback.
- Change generate_case_mapping_tests to
generate_single_byte_case_mapping_tests
(all encodings using this method happen to be single-byte)
- Change precalculation of codepoints by converting from
specific encoding, not from Unicode. This reduces creation time.
(See https://github.com/ruby/ruby/pull/7425 for a related proposal
and some additional comments.)