15479 Commits
Author SHA1 Message Date
Hiroshi SHIBATA ca7cc093c4 Merge uri-0.12.4 2025-02-26 18:49:41 +09:00
Hiroshi SHIBATA b97108a646 Merge cgi-0.3.7 2025-02-26 18:49:41 +09:00
Hiroshi SHIBATA 0ce2770e93 Revert "[ruby/openssl] Relax error message check for OpenSSL 3.1"
This reverts commit 2864f0696b.
2025-02-15 08:26:16 +09:00
Nobuyoshi Nakada 2864f0696b [ruby/openssl] Relax error message check for OpenSSL 3.1
A tentative measures fo https://github.com/ruby/openssl/issues/606.

With OpenSSL 3.1.0, the error message at connection using "self-signed
certificate" seems to return `SSL_R_TLSV1_ALERT_UNKNOWN_CA` instead of
`SSL_R_CERTIFICATE_VERIFY_FAILED`.

https://github.com/ruby/openssl/commit/fc4629d246
2025-02-14 15:58:21 +09:00
Hiroshi SHIBATA b92a9905ae Revert "Skip tests that suddenly started failing for MinGW"
This reverts commit 279fb0083a.
2024-11-20 06:53:12 +09:00
Hiroshi SHIBATA 5f5d84aa0c Removed temporary workaround for MinGW 2024-11-11 13:44:21 +09:00
MSP-Greg fdb2bee0fe [ruby/net-http] test_https.rb - fix test_session_reuse_but_expire
https://github.com/ruby/net-http/commit/5544243c41
2024-11-11 13:43:58 +09:00
Job Snijders bcc3ad7ff0 [ruby/openssl] Only CSR version 1 (encoded as 0) is allowed by PKIX standards
RFC 2986, section 4.1 only defines version 1 for CSRs. This version
is encoded as a 0. Starting with OpenSSL 3.3, setting the CSR version
to anything but 1 fails.

Do not attempt to generate a CSR with invalid version (which now fails)
and invalidate the CSR in test_sign_and_verify_rsa_sha1 by changing its
subject rather than using an invalid version.

This commit fixes the following error.

```
 2) Error: test_version(OpenSSL::TestX509Request): OpenSSL::X509::RequestError:
X509_REQ_set_version: passed invalid argument
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `version='
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `issue_csr'
/home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:43:in
`test_version'
     40:     req = OpenSSL::X509::Request.new(req.to_der)
     41:     assert_equal(0, req.version)
     42:
  => 43:     req = issue_csr(1, @dn, @rsa1024, OpenSSL::Digest.new('SHA256'))
     44:     assert_equal(1, req.version)
     45:     req = OpenSSL::X509::Request.new(req.to_der)
     46:     assert_equal(1, req.version)
```

https://github.com/ruby/openssl/commit/c06fdeb091
2024-11-11 13:43:58 +09:00
Hiroshi SHIBATA 06926ffb65 OpenSSL::TestX509Request#test_sign_and_verify_rsa_sha1 is also not working with MinGW 2024-11-06 13:30:32 +09:00
Takashi Kokubun 279fb0083a Skip tests that suddenly started failing for MinGW
These test failures first appeared on irrelevant changes. It probably
came from changes in GitHub Actions instead of CRuby's.

Until we figure out how to fix these tests, let's skip them to make the
CI usable.
2024-11-06 13:30:32 +09:00
Hiroshi SHIBATA e9cc29bb5d Pend some tests because these are not working with macOS 15 and Xcode 16 2024-11-06 13:30:32 +09:00
Jun Aruga 5db59cd50f [ruby/openssl] test_asn1.rb: Remove the assertions of the time string format without second.
This commit fixes the following errors in the tests.
Because the OpenSSL project changed the code to make the time string format
without second invalid. So, we drop the assertions.

```
1) Error: test_generalizedtime(OpenSSL::TestASN1): OpenSSL::ASN1::ASN1Error: generalizedtime is too short
/home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:698:in `decode'
/home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:698:in `decode_test'
/home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:433:in `test_generalizedtime'
     430:       OpenSSL::ASN1::GeneralizedTime.new(Time.utc(9999, 9, 8, 23, 43, 39))
     431:     # LibreSSL 3.6.0 requires the seconds element
     432:     return if libressl?
  => 433:     decode_test B(%w{ 18 0D }) + "201612081934Z".b,
     434:       OpenSSL::ASN1::GeneralizedTime.new(Time.utc(2016, 12, 8, 19, 34, 0))
     435:     # not implemented
     436:     # decode_test B(%w{ 18 13 }) + "https://github.com/ruby/openssl/commit/201612081934+0930".b,

2) Error: test_utctime(OpenSSL::TestASN1): OpenSSL::ASN1::ASN1Error: utctime is too short
/home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:698:in `decode'
/home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:698:in `decode_test'
/home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:411:in `test_utctime'
     408:     end
     409:     # Seconds is omitted. LibreSSL 3.6.0 requires it
     410:     return if libressl?
  => 411:     decode_test B(%w{ 17 0B }) + "1609082343Z".b,
     412:       OpenSSL::ASN1::UTCTime.new(Time.utc(2016, 9, 8, 23, 43, 0))
     413:     # not implemented
     414:     # decode_test B(%w{ 17 11 }) + "https://github.com/ruby/openssl/commit/500908234339+0930".b,
```

https://github.com/ruby/openssl/commit/2e826d5715
2024-05-17 17:25:59 +09:00
Kazuki Yamaguchi 89574f02e1 [ruby/openssl] test/openssl/test_asn1.rb: skip failing tests on LibreSSL 3.6.0
LibreSSL 3.6.0 expects the seconds part in UTCTime and GeneralizedTime
to be always present. LibreSSL 3.6.0 release note [1] says:

> - The ASN.1 time parser has been refactored and rewritten using CBS.
>   It has been made stricter in that it now enforces the rules from
>   RFC 5280.

[1] https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.6.0-relnotes.txt

https://github.com/ruby/openssl/commit/bbc540fe83
2024-05-17 17:25:59 +09:00
Xi Ruoyao 10f4e4d936 [ruby/net-http] Skip test_session_reuse_but_expire with OpenSSL 3.3
OpenSSL 3.3.0 9 Apr 2024 is also broken.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>

https://github.com/ruby/net-http/commit/ab525c956d
2024-05-17 17:25:59 +09:00
Hiroshi SHIBATA 26ec606bcd Merge StringIO 3.0.1.2 2024-04-23 16:04:41 +09:00
nagachika e91755734a merge revision(s) 64b6a018a3:
Fix test session reuse but expire (#9824)

	* OpenSSL 3.2.1 30 Jan 2024 is also broken

	Import 4506461072 from ruby_3_3 branch
	tentatively.
	---
	 test/net/http/test_https.rb | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)
2024-04-15 14:05:00 +09:00
Nobuyoshi Nakada 2b608349bb Omit test_session_reuse_but_expire if OpenSSL 3.2.0 2024-01-11 17:59:14 +09:00
Takashi Kokubun 21a9b182e5 Omit a broken https test on MinGW
This started to reliably fail on MinGW at an irrelevant commit:
https://github.com/ruby/ruby/actions/runs/6981002841/job/18997302124
https://github.com/ruby/ruby/actions/runs/6981946473/job/19000104223
https://github.com/ruby/ruby/actions/runs/6983823136/job/19005613809
https://github.com/ruby/ruby/actions/runs/6983912116/job/19005844596
https://github.com/ruby/ruby/actions/runs/6984215921/job/19006649495
https://github.com/ruby/ruby/actions/runs/6984383103/job/19007100446
https://github.com/ruby/ruby/actions/runs/6986489509/job/19012000642

So this failure is not detecting a new bug. Let's skip this until we fix
this test for MinGW.
2024-01-11 17:59:14 +09:00
Sorah Fukumori db2f0a75e3 [ruby/net-http] Renew test certificates
The private key is replaced with a public known test key published at
[RFC 9500].

Also lifetime has been extended to 10 years from 4 years.

[RFC 9500]: https://www.rfc-editor.org/rfc/rfc9500.html

https://github.com/ruby/net-http/commit/4ab6c4a500
2024-01-11 17:03:51 +09:00
U.Nakamura 1cae5e7cea merge revision(s) 9eac9d7178: [Backport #19969]
[Bug #19969] Compact st_table after deleted if possible

	---
	 hash.c                 | 19 +++++++++++++++++++
	 st.c                   | 40 +++++++++++++++++++++++++++++-----------
	 test/ruby/test_hash.rb |  9 +++++++++
	 3 files changed, 57 insertions(+), 11 deletions(-)
2023-11-20 21:11:21 +09:00
Hiroshi SHIBATA c39b19c5f0 Merge RubyGems-3.3.27 and Bundler-2.3.27 (#8889) 2023-11-10 07:56:05 +00:00
Nobuyoshi Nakada 42325aa826 Ease the Encoding::CompatibilityError test failure
At the time this test first started using `assert_raise_with_message`,
it did not touch `Encoding.default_internal`.
2023-11-07 15:30:35 +09:00
U.Nakamura 881088e06f merge revision(s) 4329554f17: [Backport #19985]
[Bug #19985] Raise LoadError with the converted feature name

	`Kernel#require` converts feature name objects that have the `to_path`
	method such as `Pathname`, but had used the original object on error
	and had resulted in an unexpected `TypeError`.
	---
	 load.c                    | 14 +++++++++++---
	 test/ruby/test_require.rb | 26 +++++++++++++++++++++-----
	 2 files changed, 32 insertions(+), 8 deletions(-)
2023-11-06 20:22:27 +09:00
U.Nakamura 4f7b595815 merge revision(s) 19346c2336: [Backport #19754]
[Bug #19754] Make `IO::Buffer#get_string` check `offset` range
	 (#8016)

	---
	 io_buffer.c                 | 3 +++
	 test/ruby/test_io_buffer.rb | 8 ++++++++
	 2 files changed, 11 insertions(+)
2023-11-06 20:18:14 +09:00
U.Nakamura d494cf4dda merge revision(s) 4a7d6c2852: [Backport #18991]
Fix false LocalJumpError when branch coverage is enabled

	`throw TAG_BREAK` instruction makes a jump only if the continuation of
	catch of TAG_BREAK exactly matches the instruction immediately following
	the "send" instruction that is currently being executed. Otherwise, it
	seems to determine break from proc-closure.

	Branch coverage may insert some recording instructions after "send"
	instruction, which broke the conditions for TAG_BREAK to work properly.

	This change forces to set the continuation of catch of TAG_BREAK
	immediately after "send" (or "invokesuper") instruction.

	[Bug #18991]
	---
	 compile.c                      | 25 ++++++++++++++++++++++++-
	 test/coverage/test_coverage.rb | 14 ++++++++++++++
	 2 files changed, 38 insertions(+), 1 deletion(-)
2023-11-06 20:14:41 +09:00
U.Nakamura a3e1444663 merge revision(s) 96c5a4be7b: [Backport #19894]
Fix memory leak in complemented method entries

    [Bug #19894]

    When a copy of a complemented method entry is created, there are two
    issues:

    1. IMEMO_FL_USER3 is not copied, so the complemented status is not
       copied over.
    2. In rb_method_entry_clone we increment both alias_count and
       complemented_count. However, when we free the method entry in
       rb_method_definition_release, we only decrement one of the two
       counters, resulting in the rb_method_definition_t being leaked.

    Co-authored-by: Adam Hess <adamhess1991@gmail.com>
    ---
     method.h                 |  5 +++--
     test/ruby/test_module.rb | 29 +++++++++++++++++++++++++++++
     vm_method.c              |  8 +++++---
     3 files changed, 37 insertions(+), 5 deletions(-)
2023-10-17 20:30:28 +09:00
U.Nakamura eb54ed809f merge revision(s) a28c5151f5: [Backport #19855]
Fix Array#bsearch when block returns a non-integer numeric value

	---
	 array.c                 | 4 ++--
	 test/ruby/test_array.rb | 4 ++++
	 2 files changed, 6 insertions(+), 2 deletions(-)
2023-10-10 20:02:12 +09:00
U.Nakamura e88ffb885a merge revision(s) 382678d411: [Backport #19788]
[Bug #19788] Use the result of `tCOLON2` event

	---
	 parse.y                            | 16 ++++++++--------
	 test/ripper/test_parser_events.rb  | 17 +++++++++++++++++
	 test/ripper/test_scanner_events.rb |  5 +++++
	 3 files changed, 30 insertions(+), 8 deletions(-)
2023-09-05 20:48:57 +09:00
KJ Tsanaktsidis c08fdc6838 Allow waitpid(-1) to be woken if a waitpid(pid) call is pending
If two threads are running, with one calling waitpid(-1), and another
calling waitpid($some_pid), and then $some_other_pid exits, we would
expect the waitpid(-1) call to retrieve that exit status; however, it
cannot actually do so until $some_pid _also_ exits.

This patch fixes the issue by unconditionally checking for pending
process group waits on SIGCHLD, and then allowing pending pid-only waits
to "steal" the notification.

[Fixes #19387]
2023-09-05 20:19:55 +09:00
U.Nakamura bbbf150e4d Revert "merge revision(s) 91c004885f: [Backport #19025]"
This reverts commit e55dde3bdd.
2023-07-26 11:02:57 +09:00
U.Nakamura e55dde3bdd merge revision(s) 91c004885f: [Backport #19025]
[Bug #19025] Numbered parameter names are always local variables

	---
	 parse.y                  | 2 +-
	 test/ruby/test_syntax.rb | 1 +
	 2 files changed, 2 insertions(+), 1 deletion(-)
2023-07-25 20:53:43 +09:00
U.Nakamura e7c94d9d1d merge revision(s) 09295ea796: [Backport #19543]
IO::Buffer#resize: Free internal buffer if new size is zero (#7569)

	`#resize(0)` on an IO::Buffer with internal buffer allocated will
	result in calling `realloc(data->base, 0)`. The behavior of `realloc`
	with size = 0 is implementation-defined (glibc frees the object
	and returns NULL, while BSDs return an inaccessible object). And
	thus such usage is deprecated in standard C (upcoming C23 will make it
	UB).

	To avoid this problem, just `free`s the memory when the new size is zero.
	---
	 io_buffer.c                 |  5 +++++
	 test/ruby/test_io_buffer.rb | 18 ++++++++++++++++++
	 2 files changed, 23 insertions(+)
2023-07-25 20:18:30 +09:00
Eileen M. UchitelleandAaron Patterson cba152ff1f Backport cvar clone bug fix for 19379 to 3.1 (#7889)
* Copy cvar table on clone

When a class with a class variable is cloned we need to also copy the
cvar cache table from the original table to the clone. I found this bug
while working on fixing [Bug #19379]. While this does not fix that bug
directly it is still a required change to fix another bug revealed by
the fix in https://github.com/ruby/ruby/pull/7265

This needs to be backported to 3.2.x and 3.1.x.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>

* Fix cvar caching when class is cloned

The class variable cache that was added in
https://github.com/ruby/ruby/pull/4544 changed the behavior of class
variables on cloned classes. As reported when a class is cloned AND a
class variable was set, and the class variable was read from the
original class, reading a class variable from the cloned class would
return the value from the original class.

This was happening because the IC (inline cache) is stored on the ISEQ
which is shared between the original and cloned class, therefore they
share the cache too.

To fix this we are now storing the `cref` in the cache so that we can
check if it's equal to the current `cref`. If it's different we don't
want to read from the cache. If it's the same we do. Cloned classes
don't share the same cref with their original class.

This will need to be backported to 3.1 in addition to 3.2 since the bug
exists in both versions.

We also added a marking function which was missing.

Fixes [Bug #19379]

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>

* Add missing write barrier

We were missing the write barrier for class_value to cref. This should
fix the segv we were seeing in http://ci.rvm.jp/logfiles/brlog.trunk-gc-asserts.20230601-165052

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>

---------

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2023-07-25 11:05:27 +00:00
U.NakamuraandJean Boussier 7e926c4d8c String#slice! should clear the coderange when truncating
[Bug #19739]

This bug was incidentally fixed in Ruby 3.2 via b0b9f72
but remains on 3.1 and older.

this patch is written by byroot, https://github.com/Shopify/ruby/commit/3b351ee62d4206bb72301c2e98dcb173f1e35be7

Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2023-07-25 20:00:21 +09:00
Hiroshi SHIBATA 5fbc1d45f1 CVE-2023-36617 for Ruby 3.1 (#7996)
* Bump up v0.12.2

* Merge URI-0.10.3 for Bundler
2023-06-29 13:24:35 +00:00
U.Nakamura 0275614ba2 merge revision(s) 2c8f287: [Backport #19532]
Fix handling of 6-byte codepoints in left_adjust_char_head in CESU-8
	 encoding

	---
	 enc/cesu_8.c                | 23 +++++++++++++++++++----
	 test/ruby/enc/test_cesu8.rb |  4 ++++
	 2 files changed, 23 insertions(+), 4 deletions(-)
2023-06-26 20:07:43 +09:00
U.Nakamura 344249674f merge revision(s) 1cdf8ab07b: [Backport #19323]
[Bug #19323] Raise `RangeError` instead of integer overflow

	---
	 bignum.c                  |  5 ++++-
	 test/ruby/test_integer.rb | 18 ++++++++----------
	 2 files changed, 12 insertions(+), 11 deletions(-)
2023-06-19 20:21:40 +09:00
NARUSE, YuiandTakashi Kokubun 66d626fdb5 Skip drb tests on mswin (#7789)
* Skip TestDRbSSLAry on mswin

This doesn't seem to stably work on mswin:
https://github.com/ruby/ruby/actions/runs/3505363753/jobs/5871633211

For CI stability, it generally seems like a bad idea to run druby tests
on Windows, given that it's pretty much unstable on MinGW as well.

* Do not run drb SSL tests on Windows

These tests often cause a timeout and this issue seems specific to the
Windows platforms.
https://github.com/ruby/ruby/actions/runs/3603761925/jobs/6072346738

---------

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-05-08 03:09:07 +00:00
Hiroshi SHIBATA 957bb7cb81 Merge Time-0.2.2 2023-03-30 19:53:51 +09:00
Hiroshi SHIBATA 8ce4ab1464 Merge URI-0.12.1 2023-03-29 15:27:07 +09:00
nagachika d9d95540e0 merge revision(s) 2f916812a9b818b432ee7c299e021ec62d4727fb,ac458f6bc3c520c9f23364c85bfb033acda907a6:
Skip test_europe_lisbon on macOS

	until we figure out why it's failing.
	---
	 test/ruby/test_time_tz.rb | 1 +
	 1 file changed, 1 insertion(+)

	Historical timezones of Lisbon in tzdata are unstable

	---
	 test/ruby/test_time_tz.rb | 3 +--
	 1 file changed, 1 insertion(+), 2 deletions(-)
2023-03-27 20:20:28 +09:00
Hiroshi SHIBATA da27583cf3 Merge URI-0.12.0 2023-03-26 14:22:38 +09:00
nagachika e66b7917d7 merge revision(s) 195e32977f:
Skip test_udp_server on s390x RHEL 7.1

	It seems like it never succeeds on this CI.
	---
	 test/socket/test_socket.rb | 4 ++++
	 1 file changed, 4 insertions(+)
2023-03-25 16:06:44 +09:00
nagachika cd4a997e53 merge revision(s) 548086b34e3dd125edabf5dc1e46b891fad3ea9c,3dc8cde70078ccb38f5f4b0818ad5eecded01bd5,e0cf80d666d4b5df3229f030a16d10d21323508e: [Backport #19529]
ObjectSpace::WeakMap: fix compaction support

	[Bug #19529]

	`rb_gc_update_tbl_refs` can't be used on `w->obj2wmap` because it's
	not a `VALUE -> VALUE` table, but a `VALUE -> VALUE *` table, so
	we need some dedicated iterator.
	---
	 test/ruby/test_weakmap.rb |  8 ++++++++
	 weakmap.c                 | 37 ++++++++++++++++++++++++++++++++++++-
	 2 files changed, 44 insertions(+), 1 deletion(-)

	Fix crash during compaction

	[Bug #19529]

	The fix for [Bug #19529] in commit 548086b contained a bug that crashes
	on the following script:

	```
	wm = ObjectSpace::WeakMap.new
	obj = Object.new
	100.times do
	  wm[Object.new] = obj
	  GC.start
	end
	GC.compact
	```
	---
	 test/ruby/test_weakmap.rb | 10 ++++++++++
	 weakmap.c                 |  2 +-
	 2 files changed, 11 insertions(+), 1 deletion(-)

	Fix incorrect size of WeakMap buffer

	In wmap_final_func, j is the number of elements + 1 (since j also
	includes the length at the 0th index), so we should resize the buffer
	to size j and the new length is j - 1.
	---
	 weakmap.c | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)
2023-03-25 15:03:14 +09:00
nagachika bdbe605385 merge revision(s) 7bd7aee02e: [Backport #18464]
Fix interpreter crash caused by RUBY_INTERNAL_EVENT_NEWOBJ + Ractors

	When a Ractor is created whilst a tracepoint for
	RUBY_INTERNAL_EVENT_NEWOBJ is active, the interpreter crashes. This is
	because during the early setup of the Ractor, the stdio objects are
	created, which allocates Ruby objects, which fires the tracepoint.
	However, the tracepoint machinery tries to dereference the control frame
	(ec->cfp->pc), which isn't set up yet and so crashes with a null pointer
	dereference.

	Fix this by not firing GC tracepoints if cfp isn't yet set up.
	---
	 gc.c                         |  1 +
	 test/objspace/test_ractor.rb | 17 +++++++++++++++++
	 2 files changed, 18 insertions(+)
	 create mode 100644 test/objspace/test_ractor.rb
2023-03-25 14:35:55 +09:00
nagachika 5c5a1135b2 merge revision(s) 790cf4b6d0: [Backport #19115]
Fix autoload status of statically linked extensions

	Previously, for statically-linked extensions, we used
	`vm->loading_table` to delay calling the init function until the
	extensions are required. This caused the extensions to look like they
	are in the middle of being loaded even before they're required.
	(`rb_feature_p()` returned true with a loading path output.) Combined
	with autoload, queries like `defined?(CONST)` and `Module#autoload?`
	were confused by this and returned nil incorrectly. RubyGems uses
	`defined?` to detect if OpenSSL is available and failed when OpenSSL was
	available in builds using `--with-static-linked-ext`.

	Use a dedicated table for the init functions instead of adding them to
	the loading table. This lets us remove some logic from non-EXTSTATIC
	builds.

	[Bug #19115]
	---
	 load.c                     | 55 +++++++++++++++++++++++++++++++++++-----------
	 test/ruby/test_autoload.rb | 18 +++++++++++++++
	 vm.c                       |  3 +++
	 vm_core.h                  |  9 ++++++++
	 4 files changed, 72 insertions(+), 13 deletions(-)
2023-03-25 14:25:37 +09:00
nagachika 810ae06c06 merge revision(s) 2e7e153a2a: [Backport #19242]
[Bug #19242] Prohibit circular causes to be loaded

	---
	 error.c                     |  4 ++++
	 eval.c                      |  4 ++++
	 eval_error.c                | 11 +++++++++++
	 test/ruby/test_exception.rb | 12 ++++++++++++
	 4 files changed, 31 insertions(+)
2023-03-25 11:04:33 +09:00
nagachika 8c99882dad merge revision(s) cd5cafa4a3: [Backport #18827]
Respect the encoding of the source [Bug #18827]

	Do not override the input string encoding at the time of preparation,
	the source encoding is not determined from the input yet.
	---
	 parse.y                  | 26 ++++++++++++++++----------
	 test/ruby/test_ast.rb    | 13 +++++++++++++
	 test/ruby/test_syntax.rb |  9 +++++++++
	 3 files changed, 38 insertions(+), 10 deletions(-)
2023-03-25 10:33:20 +09:00
nagachika 477ab3f6c7 merge revision(s) c5475f4269: [Backport #18748]
Fix Range#cover? returning true for beginless ranges of different
	 types

	Previously `(2..).cover?("2"..)` was false, but
	`(..2).cover?(.."2")` was true.  This changes it so both are false,
	treating beginless ranges the same as endless ranges in regards to
	type checks.

	This also adds documentation to #cover? to describe behavior with
	beginless and endless ranges, testing each documentation example,
	which is how this bug was found.

	Fixes [Bug #18155]
	---
	 range.c                 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++-
	 test/ruby/test_range.rb | 29 ++++++++++++++++++++++++++
	 2 files changed, 82 insertions(+), 1 deletion(-)
2023-03-25 10:31:31 +09:00
nagachikaandAlan Wu 6ee749a528 Revert "Skip the test for [Bug #19316] for a while."
This reverts commit 82d763c94a,
and add exit: :any to assert_compile.

Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2023-03-25 09:50:40 +09:00