summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* * 2023-05-08 [ci skip]ruby_3_1git2023-05-081-1/+1
|
* Skip drb tests on mswin (#7789)NARUSE, Yui2023-05-081-2/+6
| | | | | | | | | | | | | | | | | | | * 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-05 [ci skip]git2023-05-051-2/+2
|
* Use vcpkg instead of chocolatey for openssl (#7788)NARUSE, Yui2023-05-051-3/+1
|
* Merge Time-0.2.2v3_1_4Hiroshi SHIBATA2023-03-303-4/+13
|
* bump patchlevelnagachika2023-03-301-2/+2
|
* * 2023-03-29 [ci skip]git2023-03-291-1/+1
|
* Added assert_linear_performance for URI testsHiroshi SHIBATA2023-03-291-0/+33
|
* Merge URI-0.10.2 for bundlerHiroshi SHIBATA2023-03-292-3/+3
|
* Merge URI-0.12.1Hiroshi SHIBATA2023-03-293-3/+14
|
* merge revision(s) ↵nagachika2023-03-272-3/+3
| | | | | | | | | | | | | | | | | 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(-)
* Merge URI-0.12.0Hiroshi SHIBATA2023-03-2612-25/+251
|
* merge revision(s) e7342e76dfd26237c604e42f9a59a1eaa578c94e: [Backport #19485]nagachika2023-03-262-2/+8
| | | | | | | | | [Bug #19485] [DOC] Mention tabs in indentation of heredoc identifier Co-Authored-By: sawa (Tsuyoshi Sawada) <sawadatsuyoshi@gmail.com> --- doc/syntax/literals.rdoc | 6 ++++++ 1 file changed, 6 insertions(+)
* merge revision(s) 195e32977f181c8af9233a12cfc2c98e0f7957f6:nagachika2023-03-252-1/+5
| | | | | | | | | 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(+)
* merge revision(s) 8d1109c03bacc952b6218af2e4ae9b74c9855273:nagachika2023-03-252-4/+6
| | | | | | | | Added assertion values for Amazon Linux 2023 --- spec/ruby/core/file/utime_spec.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
* merge revision(s) ↵nagachika2023-03-253-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(-)
* merge revision(s) 7bd7aee02e303de27d2cddfc5ef47e612d6782cb: [Backport #18464]nagachika2023-03-253-1/+19
| | | | | | | | | | | | | | | | | | | 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
* merge revision(s) 790cf4b6d0475614afb127b416e87cfa39044d67: [Backport #19115]nagachika2023-03-255-14/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | 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(-)
* fixup for 823835499539aa53128a025ab72eb00c288dfb09.nagachika2023-03-252-2/+1
|
* merge revision(s) d6ce4180a5b4dacbac895c9911031a6df6c61136: [Backport #19243]nagachika2023-03-253-3/+16
| | | | | | | | | | | | | Windows: Fix encoding of Dir.home Dir.home returns an UTF-8 string since ruby-3.0, but the actual encoding of the bytes was CP_ACP or CP_OEMCP. That led to invalid bytes when calling Dir.home with an unicode username. --- spec/ruby/core/dir/home_spec.rb | 11 +++++++++++ win32/file.c | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-)
* merge revision(s) 2e7e153a2af1456515d43b6381e38534b069b1c2: [Backport #19242]nagachika2023-03-255-1/+32
| | | | | | | | | | | [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(+)
* merge revision(s) cd5cafa4a380e2459862b6e99ff0c381362ef1be: [Backport #18827]nagachika2023-03-254-11/+39
| | | | | | | | | | | | 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(-)
* merge revision(s) c5475f42694eff35465c3332e0182c0611ca5918: [Backport #18748]nagachika2023-03-253-2/+83
| | | | | | | | | | | | | | | | | | | | 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(-)
* merge revision(s) f229b36087f1b387d77af8f3fa50f9bffd2fd44e: [Backport #18989]nagachika2023-03-252-2/+2
| | | | | | | | | Fix test fail with assert_ractor outside of ruby/ruby repo Revert 806583c093ecc2d67830f0a8f0d94decf0ed71e5 --- tool/lib/core_assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
* Revert "Skip the test for [Bug #19316] for a while."nagachika2023-03-252-4/+3
| | | | | | | This reverts commit 82d763c94ad693a2af8086df8e0455b7de2d2ce3, and add exit: :any to assert_compile. Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
* merge revision(s) 96d1acfdf6c6b42f2029f44d5b5920961d6efa92: [Backport #19161]nagachika2023-03-212-1/+8
| | | | | | | | | [Bug #19161] Check for TLS usability On all platforms using GCC, even other than darwin. --- configure.ac | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
* merge revision(s) dd28c55a7cd6780dad637b4d6a20507fbfc6af4a: [Backport #19445]nagachika2023-03-213-2/+5
| | | | | | | | | | [Bug#19445] Fix keyword splat in enumerator Extracted arguments do not have keyword hash to splat. --- numeric.c | 2 +- test/ruby/test_numeric.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
* merge revision(s) 86de48e9f69b665ba9ffb5bdc5a181a3adb1a7b8: [Backport #19419]nagachika2023-03-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Remove ibf_dumper's WB_PROTECTED status It doesn't have the right write barriers in place. For example, there is rb_mark_set(dump->global_buffer.obj_table); in the mark function, but there is no corresponding write barrier when adding to the table in the `ibf_dump_object() -> ibf_table_find_or_insert() -> st_insert()` code path. To insert write barrier correctly, we need to store the T_STRUCT VALUE inside `struct ibf_dump`. Instead of doing that, let's just demote it to WB unproected for correctness. These dumper object are ephemeral so there is not a huge benefit for having them WB protected. Users of the bootsnap gem ran into crashes due to this issue: https://github.com/Shopify/bootsnap/issues/436 Fixes [Bug #19419] --- compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
* merge revision(s) ↵nagachika2023-03-217-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8ce2fb9bbbaea14737c84385b1573f743a30f773,3a0f6ce1d31eefd8af01b50f3632a64d64e8f8c1: [Backport #19415] Only emit circular dependency warning for owned thread shields [Bug #19415] If multiple threads attemps to load the same file concurrently it's not a circular dependency issue. So we check that the existing ThreadShield is owner by the current fiber before warning about circular dependencies. --- internal/thread.h | 1 + load.c | 3 ++- spec/ruby/core/kernel/shared/require.rb | 11 +++++++++++ spec/ruby/fixtures/code/concurrent_require_fixture.rb | 4 ++++ test/ruby/test_require.rb | 3 --- thread.c | 11 +++++++++++ 6 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 spec/ruby/fixtures/code/concurrent_require_fixture.rb Use Thread.pass until thread.stop? to wait for thread to block [Bug #19415] It should be more reliable --- spec/ruby/fixtures/code/concurrent_require_fixture.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
* merge revision(s) 3a7367ccc319499127ead147e5a08f769e44208e: [Backport #19403]nagachika2023-03-214-13/+6
| | | | | | | | | | | | | mkconfig: Map `includedir` only for system ruby Only when installing to the system path on macOS, prepend '$(SDKROOT)' and remap `includedir`. Fix https://github.com/rbenv/ruby-build/discussions/2123 --- test/mkmf/test_config.rb | 4 ++-- test/test_rbconfig.rb | 9 --------- tool/mkconfig.rb | 4 +++- 3 files changed, 5 insertions(+), 12 deletions(-)
* merge revision(s) c6f84e918943a0bf8db6fee556fc53180d257510: [Backport #19398]nagachika2023-03-213-1/+11
| | | | | | | | | | | | | | | | | | | | | | [Bug #19398] Memory leak in WeakMap There's a memory leak in ObjectSpace::WeakMap due to not freeing the `struct weakmap`. It can be seen in the following script: ``` 100.times do 10000.times do ObjectSpace::WeakMap.new end # Output the Resident Set Size (memory usage, in KB) of the current Ruby process puts `ps -o rss= -p #{$$}` end ``` --- gc.c | 1 + test/ruby/test_weakmap.rb | 9 +++++++++ 2 files changed, 10 insertions(+)
* Skip the test for [Bug #19316] for a while.nagachika2023-03-212-1/+2
|
* merge revision(s) 0bb07e5ba40cdc45d55743dd1ebaadd7e7363e7f: [Backport #19284]nagachika2023-03-212-2/+2
| | | | | | | | | | | | Fix test when Ruby is verbose The test added in 90a80eb0 fails if Ruby is verbose, it outputs the following line to stderr: RUBY_GC_HEAP_INIT_SLOTS=100 (default value: 10000) --- test/ruby/test_gc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
* merge revision(s) 21dced8b01823a991829b66ffdc8ffc635965c76: [Backport #19389]nagachika2023-03-213-3/+6
| | | | | | | | | | [ruby/stringio] [Bug #19389] Fix chomping with longer separator https://github.com/ruby/stringio/commit/eb322a9716 --- ext/stringio/stringio.c | 5 +++-- test/stringio/test_stringio.rb | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-)
* merge revision(s) 72eb33066fa9e7dacb7470cd140b219abe37667e: [Backport #19320]nagachika2023-03-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix off-by-one error in rb_vm_each_stack_value Applying the following patch to test/erb/test_erb.rb and running that file will cause Ruby to crash on my machine (macOS 13.1 on M1 Pro): ``` --- a/test/erb/test_erb.rb +++ b/test/erb/test_erb.rb @@ -7,6 +7,12 @@ class TestERB < Test::Unit::TestCase class MyError < RuntimeError ; end + def setup + GC.auto_compact = true + GC.stress = true + GC.verify_compaction_references(expand_heap: true, toward: :empty) + end + ``` It crashes with the following log: ``` /Users/peter/src/ruby/lib/erb/compiler.rb:276: [BUG] Segmentation fault at 0x00000001083a8690 ... -- C level backtrace information ------------------------------------------- ... /Users/peter/src/ruby/build/ruby(rb_vm_each_stack_value+0xa8) [0x104cc3a44] ../vm.c:2737 /Users/peter/src/ruby/build/ruby(rb_vm_each_stack_value+0xa8) [0x104cc3a44] ../vm.c:2737 /Users/peter/src/ruby/build/ruby(check_stack_for_moved+0x2c) [0x104b272a4] ../gc.c:5512 /Users/peter/src/ruby/build/ruby(gc_compact_finish) ../gc.c:5534 /Users/peter/src/ruby/build/ruby(gc_sweep_compact) ../gc.c:8653 /Users/peter/src/ruby/build/ruby(gc_sweep) ../gc.c:6196 /Users/peter/src/ruby/build/ruby(has_sweeping_pages+0x0) [0x104b19c54] ../gc.c:9568 /Users/peter/src/ruby/build/ruby(gc_rest) ../gc.c:9570 ``` This crash happens because it's reading the VALUE at sp. But since sp points to the top of the stack, it's reading the VALUE above the top of the stack, which is causing this segfault. Fixes [Bug #19320] --- vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
* merge revision(s) 90a80eb076429978e720e11fb17a3cbb96de3454: [Backport #19284]nagachika2023-03-213-13/+20
| | | | | | | | | | | | | | Fix integer underflow when using HEAP_INIT_SLOTS There is an integer underflow when the environment variable RUBY_GC_HEAP_INIT_SLOTS is less than the number of slots currently in the Ruby heap. [Bug #19284] --- gc.c | 25 +++++++++++++------------ test/ruby/test_gc.rb | 5 +++++ 2 files changed, 18 insertions(+), 12 deletions(-)
* merge revision(s) aeddc19340c7116d48fac3080553fbb823857d16: [Backport #19316]nagachika2023-03-213-1/+19
| | | | | | | | | | | | | | | | | | | | | YJIT: Save PC and SP before calling leaf builtins (#7090) Previously, we did not update `cfp->sp` before calling the C function of ISEQs marked with `Primitive.attr! "inline"` (leaf builtins). This caused the GC to miss temporary values on the stack in case the function allocates and triggers a GC run. Right now, there is only a few leaf builtins in numeric.rb on Integer methods such as `Integer#~`. Since these methods only allocate when operating on big numbers, we missed this issue. Fix by saving PC and SP before calling the functions -- our usual protocol for calling C functions that may allocate on the GC heap. [Bug #19316] --- test/ruby/test_yjit.rb | 16 ++++++++++++++++ yjit/src/codegen.rs | 4 ++++ 2 files changed, 20 insertions(+)
* merge revision(s) d8ef0a98c670449b20436947f5ebbd327ed5ab0d: [Backport #19319]nagachika2023-03-212-1/+3
| | | | | | | | | | | | | | | | | | | | [Bug #19319] Fix crash in rb_str_casemap The following code crashes on my machine: ``` GC.stress = true str = "testing testing testing" puts str.capitalize ``` We need to ensure that the object `buffer_anchor` remains on the stack so it does not get GC'd. --- string.c | 2 ++ 1 file changed, 2 insertions(+)
* merge revision(s) 837ef8911c638c3e2bdb6af710de7c1fac7b5f90: [Backport #19305]nagachika2023-03-213-9/+32
| | | | | | | | | | | | | | Fix crash in TracePoint c_call for removed method trace_arg->id is the ID of the original method of an aliased method. If the original method is removed, then the lookup will fail. We should use trace_arg->called_id instead, which is the ID of the aliased method. Fixes [Bug #19305] --- test/ruby/test_settracefunc.rb | 23 +++++++++++++++++++++++ vm_trace.c | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-)
* merge revision(s) 542e984d82fa25098eb15398d716d907acc52b93: [Backport #19292]nagachika2023-03-213-13/+27
| | | | | | | | | [Bug #19292] Re-initialize tm when wday or yday is not set --- test/ruby/test_time.rb | 3 ++- time.c | 31 ++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-)
* merge revision(s) 613fca01486e47dee9364a2fd86b5f5e77fe23c8: [Backport #19189]nagachika2023-02-232-2/+2
| | | | | | | | [Bug #19189] Fallback to the default "pkg-config" --- lib/mkmf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
* merge revision(s) 8038d5e40a079d60dfcf7cab1155528959760c28: [Backport #18765]nagachika2023-02-232-56/+108
| | | | | | | | | | Revert flawed doc for slice_after, slice_when, and chunk_while (#5952) Restores doc for the methods that were cited in https://bugs.ruby-lang.org/issues/18765. --- enum.c | 162 +++++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 107 insertions(+), 55 deletions(-)
* merge revision(s) 3ddf6ad4d2f6dae4caa00b8c407768c7062099a0: [Backport #18629]nagachika2023-02-233-2/+7
| | | | | | | | | Private local variables should shadow outer variables [Bug #18629] --- parse.y | 3 ++- test/ruby/test_parse.rb | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-)
* bump patchlevelnagachika2023-02-231-1/+1
|
* Backport https://github.com/ruby/ruby/pull/7321Hiroshi SHIBATA2023-02-231-2/+5
|
* merge revision(s) ↵nagachika2023-02-234-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 656f25987cf2885104d5b13c8d3f5b7d32f1b333,98074a57ca9f3169fe9da9af6c49b636d37db16f,745dcf5326ea2c8e2047a3bddeb0fbb7e7d07649,b335d899fff3cc22b022c9ee2ceb636d714bf1a7: [Backport #19153] [ruby/cgi] Fix test_cgi_cookie_new_with_domain to pass on older rubies https://github.com/ruby/cgi/commit/05f0c58048 --- test/cgi/test_cgi_cookie.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) [ruby/cgi] Prepare to release 0.3.6 https://github.com/ruby/cgi/commit/710a647855 --- lib/cgi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/cgi] Loosen the domain regex to accept '.' (https://github.com/ruby/cgi/pull/29) * Loosen the domain regex to accept '.' Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> https://github.com/ruby/cgi/commit/5e09d632f3 Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org> --- lib/cgi/cookie.rb | 2 +- test/cgi/test_cgi_cookie.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) [ruby/cgi] Bump up 0.3.6 https://github.com/ruby/cgi/commit/827b7d43cc --- lib/cgi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
* common.mk: test-bundled-gems-prepare: pin-down hoe version.nagachika2022-12-172-3/+3
| | | | | hoe-4.0.0 causes test failure in minitest. https://github.com/ruby/actions/actions/runs/3715629538
* merge revision(s) 58cc3c9f387dcf8f820b43e043b540fa06248da3: [Backport #19187]nagachika2022-12-092-9/+18
| | | | | | | | [Bug #19187] Fix for tzdata-2022g --- test/ruby/test_time_tz.rb | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
* bump teeny version to 3.1.4.nagachika2022-11-241-2/+2
|
* merge revision(s) 3071a727e081f754e71a9abed8dd19e36bacc785:v3_1_3nagachika2022-11-242-2/+3
| | | | | | | | Add a comment about confusing code [ci skip] --- configure.ac | 1 + 1 file changed, 1 insertion(+)