summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-21merge revision(s) 0bb07e5ba40cdc45d55743dd1ebaadd7e7363e7f: [Backport #19284]nagachika
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(-)
2023-03-21merge revision(s) 21dced8b01823a991829b66ffdc8ffc635965c76: [Backport #19389]nagachika
[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(-)
2023-03-21merge revision(s) 72eb33066fa9e7dacb7470cd140b219abe37667e: [Backport #19320]nagachika
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(-)
2023-03-21merge revision(s) 90a80eb076429978e720e11fb17a3cbb96de3454: [Backport #19284]nagachika
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(-)
2023-03-21merge revision(s) aeddc19340c7116d48fac3080553fbb823857d16: [Backport #19316]nagachika
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(+)
2023-03-21merge revision(s) d8ef0a98c670449b20436947f5ebbd327ed5ab0d: [Backport #19319]nagachika
[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(+)
2023-03-21merge revision(s) 837ef8911c638c3e2bdb6af710de7c1fac7b5f90: [Backport #19305]nagachika
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(-)
2023-03-21merge revision(s) 542e984d82fa25098eb15398d716d907acc52b93: [Backport #19292]nagachika
[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(-)
2023-02-23merge revision(s) 613fca01486e47dee9364a2fd86b5f5e77fe23c8: [Backport #19189]nagachika
[Bug #19189] Fallback to the default "pkg-config" --- lib/mkmf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2023-02-23merge revision(s) 8038d5e40a079d60dfcf7cab1155528959760c28: [Backport #18765]nagachika
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(-)
2023-02-23merge revision(s) 3ddf6ad4d2f6dae4caa00b8c407768c7062099a0: [Backport #18629]nagachika
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(-)
2023-02-23bump patchlevelnagachika
2023-02-23Backport https://github.com/ruby/ruby/pull/7321Hiroshi SHIBATA
2023-02-23merge revision(s) ↵nagachika
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(-)
2022-12-17common.mk: test-bundled-gems-prepare: pin-down hoe version.nagachika
hoe-4.0.0 causes test failure in minitest. https://github.com/ruby/actions/actions/runs/3715629538
2022-12-09merge revision(s) 58cc3c9f387dcf8f820b43e043b540fa06248da3: [Backport #19187]nagachika
[Bug #19187] Fix for tzdata-2022g --- test/ruby/test_time_tz.rb | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
2022-11-24bump teeny version to 3.1.4.nagachika
2022-11-24merge revision(s) 3071a727e081f754e71a9abed8dd19e36bacc785:v3_1_3nagachika
Add a comment about confusing code [ci skip] --- configure.ac | 1 + 1 file changed, 1 insertion(+)
2022-11-23disable remote tests in debug.gem on macOS.nagachika
2022-11-22Merge CGI-0.3.5Hiroshi SHIBATA
2022-11-22Merge RubyGems-3.3.26 and Bundler-2.3.26Hiroshi SHIBATA
2022-11-22Merge RubyGems-3.3.25 and Bundler-2.3.25Hiroshi SHIBATA
2022-11-22Merge RubyGems-3.3.24 and Bundler-2.3.24Hiroshi SHIBATA
2022-11-22merge revision(s) 36f297e62108072b9377d927321928b994f66a93:nagachika
Use valid tokens as cookie names --- spec/ruby/library/cgi/cookie/name_spec.rb | 12 ++++++------ spec/ruby/library/cgi/cookie/parse_spec.rb | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-)
2022-11-13merge revision(s) b8f0dc59d52266d9fbfc039e2f4b0f727c62baa0: [Backport #18599]nagachika
rb_provide_feature: Prevent $LOADED_FEATURES from being copied [Bug #18599] `vm->loaded_features` and `vm->loaded_features_snapshot` both share the same root. When a feature is pushed into `loaded_features`, the sharing is broken and `loaded_features` is copied. So an application requiring 1000 files, will allocate 1000 arrays of increasing size, which is very wasteful. To avoid this, we first clear the snapshot, so that `loaded_features` can directly be pushed into. Co-Authored-By: Peter Zhu <peter.zhu@shopify.com> --- load.c | 4 ++++ 1 file changed, 4 insertions(+)
2022-11-13merge revision(s) 131c31a9209c61f84d318aa18b61f468f48b8219: [Backport #19081]nagachika
[Bug #19081] Show the caller location in warning for Ractor The internal location in ractor.rb is not usefull at all. ``` $ ruby -e 'Ractor.new {}' <internal:ractor>:267: warning: Ractor is experimental, ... ``` --- bootstraptest/test_ractor.rb | 6 ++++++ ractor.c | 6 ------ ractor.rb | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-)
2022-11-13merge revision(s) 011d4c57d21220249600dfb76db84840550da019: [Backport #19106]nagachika
[Bug #19106] Normalize time at 24:00:00 with a timezone object --- test/ruby/test_time_tz.rb | 5 +++++ time.c | 24 ++++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-)
2022-11-13merge revision(s) eacedcfe44a0ae22bf54ddb7df193c48d4c857c6: [Backport #19105]nagachika
mutex: Raise a ThreadError when detecting a fiber deadlock (#6680) [Bug #19105] If no fiber scheduler is registered and the fiber that owns the lock and the one that try to acquire it both belong to the same thread, we're in a deadlock case. Co-authored-by: Jean Boussier <byroot@ruby-lang.org> --- test/fiber/test_mutex.rb | 22 +++++++++++++++++++++- thread_sync.c | 4 ++++ 2 files changed, 25 insertions(+), 1 deletion(-)
2022-11-13merge revision(s) 199b59f065ce6f1c13b8424f35a70c513523211b: [Backport #19116]nagachika
Fix bug in array pack with shared strings If string literals are long and they become shared, we need to make them independent before we can write to them. [Bug #19116] --- pack.c | 1 + test/ruby/test_array.rb | 6 ++++++ 2 files changed, 7 insertions(+)
2022-11-05bump patchlevelnagachika
2022-11-05Merge reline-0.3.1Hiroshi SHIBATA
2022-11-05merge revision(s) 2bb89b7f114e4beb3012f63e12e726ae23005e6f: [Backport #19101]nagachika
Lower priority of `POSIX_MADV_DONTNEED`. (#6671) --- cont.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
2022-11-05merge revision(s) 16953867ed8fc951364f05fdf0c9267799e3087a: [Backport #18380]nagachika
We don't care about actual hostname resolution. (#6652) https://bugs.ruby-lang.org/issues/18380 --- test/fiber/test_address_resolve.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2022-11-05merge revision(s) ↵nagachika
35c794b26d406c39f90e188e3884003fe6aca532,725626d8905fe1ac4a2cf1c3e2db6412bf8f381f,b32a3f1275a8c7748f2134492ce3c532f277d261: [Backport #18964] Fixed by [Bug #18964] --- file.c | 3 --- 1 file changed, 3 deletions(-) [Bug #18964] Update the code range of appended portion --- ext/-test-/econv/append.c | 15 +++++++++++++++ ext/-test-/econv/extconf.rb | 3 +++ ext/-test-/econv/init.c | 11 +++++++++++ transcode.c | 34 ++++++++++++++++++++++++++++++---- 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 ext/-test-/econv/append.c create mode 100644 ext/-test-/econv/extconf.rb create mode 100644 ext/-test-/econv/init.c [Bug #18964] Add test for `rb_econv_append` --- test/-ext-/econv/test_append.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/-ext-/econv/test_append.rb
2022-11-05merge revision(s) 54cad3123a07583c90e85bcfc55ebd87124c1250: [Backport #19004]nagachika
[Bug #19004] `Complex.polar` handles complex singular `abs` argument `Complex.polar` accepts Complex values as arguments for the polar form as long as the value of the complex has no imaginary part (ie it is 'real'). In `f_complex_polar` this is handled by extracting the real part of the arguments. However in the case `polar` is called with only a single argument, the absolute value (abs), then the Complex is created without applying a check on the type of abs, meaning it is possible to create a Complex where the real part is itself an instance of a Complex. This change removes the short circuit for the single argument case meaning the real part extraction is performed correctly (by f_complex_polar). Also adds an example to `spec/ruby/core/complex/polar_spec.rb` to check that the real part of a complex argument is correctly extracted and used in the resulting Complex real and imaginary parts. --- complex.c | 13 ++++++------- spec/ruby/core/complex/polar_spec.rb | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-)
2022-10-24Bump up net-http 0.3.0Hiroshi SHIBATA
2022-10-24merge revision(s) 399747926c323aca4f477ac3f8870b19229f4212:nagachika
Update bundled gems list at 2022-10-24 --- NEWS.md | 2 +- gems/bundled_gems | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
2022-10-24merge revision(s) c506ddac6c88b14daf4a18bddf1c1e57be8d2225:nagachika
Added assert_true and assert_false same as test-unit gem --- tool/lib/test/unit/assertions.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
2022-10-23merge revision(s) 329d5424a479bb08e75bd750c51a5382e382731c: [Backport #19042]nagachika
[Bug #19042] Fix Dir.glob brace with '/' Dir.glob brace pattern with '/' after '**' does not match paths in recursive expansion process. We expand braces with '/' before expanding a recursive. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> --- dir.c | 2 +- test/ruby/test_dir.rb | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-)
2022-10-23merge revision(s) bbe5ec78463f8d6ef2e1a3571f17357a3d9ec8e4: [Backport #18994]nagachika
rb_int_range_last: properly handle non-exclusive range [Bug #18994] --- range.c | 8 ++++---- spec/ruby/core/range/last_spec.rb | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-)
2022-10-23merge revision(s) 280b805d040fa537d5a459b40d4bfa6d49700905: [Backport #18909]nagachika
[DOC] Fix documentation for ARGF#readlines [Bug #18909] --- io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
2022-10-22merge revision(s) f88bff770578583a708093f4a0d8b1483a1d2039:nagachika
[ruby/net-http] Revert "Replace Timeout.timeout in Net:HTTP#connect" This reverts commit https://github.com/ruby/net-http/commit/753cae3bbccc. https://github.com/ruby/net-http/commit/98caa38204 --- lib/net/http.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
2022-10-22merge revision(s) ac1bb6b51032ad8d34a1060f5f6b5b10b60dc183:nagachika
[ruby/net-http] Rename `D` to `debug` in `Net::HTTP` Renames `D` to `debug` in `Net::HTTP` and introduces an alias for backwards compatibility. This was done for readability reasons, in that `D` did not clearly reflect what the method was doing and can cause some confusion. https://github.com/ruby/net-http/commit/582d6e87d6 --- lib/net/http.rb | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-)
2022-10-21Revert "merge revision(s) b9083c206aa02a824970e809d66607dd2c1a90f1:"nagachika
This reverts commit 97e50a056e795f6551cae2f07a9996f4adf73a1f.
2022-10-21merge revision(s) 7e24ebc649b9b12e5fc704d7fc7563aeaf589e03:nagachika
Disable msystem: MINGW64 job on GitHub Actions (#6545) --- .github/workflows/mingw.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
2022-10-21merge revision(s) 881bc2a1765e7c19ab389c53841adc5ac329f1aa:nagachika
Skip running a DRb test on MinGW It hangs even after a retry https://github.com/ruby/ruby/runs/7966439530?check_suite_focus=true We contacted GitHub Suppport about this before, and we concluded that the problem is on our end. Unfortunately we don't have a bandwidth to fix this MinGW problem, so until we get to work on it, this should be just skipped to avoid a sporadic CI timeout. --- test/drb/drbtest.rb | 1 + test/drb/test_drbssl.rb | 4 ++++ test/rinda/test_rinda.rb | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-)
2022-10-21merge revision(s) 232e2f598103c8eda37d08913665b72b6f787e3f:nagachika
Skip TupleSpaceProxyTest on MINGW64 too It wasn't specific to UCRT64 https://github.com/ruby/ruby/runs/7062992464 --- test/rinda/test_rinda.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2022-10-21merge revision(s) 49d59215506a30c8a11766627f7af0cdfe0de9d4:nagachika
Fix Rinda test teardown for omitted tests New test failures on MINGW appeared after c2e37c8ff7da395f33fae546d9ae9e2408fc9236. 1) Error: Rinda::TupleSpaceProxyTest#test_00_template: NoMethodError: undefined method `stop_service' for nil:NilClass D:/a/ruby/ruby/src/test/rinda/test_rinda.rb:516:in `teardown' 2) Error: Rinda::TupleSpaceProxyTest#test_ruby_talk_264062: NoMethodError: undefined method `stop_service' for nil:NilClass D:/a/ruby/ruby/src/test/rinda/test_rinda.rb:516:in `teardown' Teardown happens even when the test is omitted. See: https://github.com/ruby/ruby/runs/7058984522 --- test/rinda/test_rinda.rb | 4 ++++ 1 file changed, 4 insertions(+)
2022-10-21merge revision(s) c2e37c8ff7da395f33fae546d9ae9e2408fc9236:nagachika
Try skipping TupleSpaceProxyTest on MinGW UCRT64 As you all know, MinGW UCRT64 CI has randomly got stuck despite its "Finished tests" output. Looking at the logs closely, it seems like all of the recent such reproductions end with the following output: ``` Retrying hung up testcases... [ 1/14] Rinda::TupleSpaceProxyTest#test_ruby_talk_264062 = 0.21 s [ 2/14] Rinda::TupleSpaceProxyTest#test_00_template = 0.01 s [ 3/14] Rinda::TupleSpaceProxyTest#test_inp_rdp = 0.00 s [ 4/14] Rinda::TupleSpaceProxyTest#test_core_03_notify = 0.01 s [ 5/14] Rinda::TupleSpaceProxyTest#test_00_renewer = 0.01 s [ 6/14] Rinda::TupleSpaceProxyTest#test_cancel_02 = 0.11 s [ 7/14] Rinda::TupleSpaceProxyTest#test_00_DRbObject = 0.00 s [ 8/14] Rinda::TupleSpaceProxyTest#test_core_02 = 0.11 s [ 9/14] Rinda::TupleSpaceProxyTest#test_core_01 = 0.11 s [10/14] Rinda::TupleSpaceProxyTest#test_remote_array_and_hash = 0.01 s [11/14] Rinda::TupleSpaceProxyTest#test_00_tuple = 0.00 s [12/14] Rinda::TupleSpaceProxyTest#test_take_bug_8215 = 0.41 s [13/14] Rinda::TupleSpaceProxyTest#test_cancel_01 = 0.11 s [14/14] Rinda::TupleSpaceProxyTest#test_symbol_tuple = 0.01 s Finished tests in 719.252845s, 29.4292 tests/s, 3838.7154 assertions/s. 21167 tests, 2761007 assertions, 0 failures, 0 errors, 708 skips ``` https://github.com/ruby/ruby/runs/7057789554 While it seems to be retried successfully, given that it hungs up once and this appears all the time, this test class seems a bit suspicious. To check if it's related, let me try disabling this for now. --- test/rinda/test_rinda.rb | 3 +++ 1 file changed, 3 insertions(+)
2022-10-21merge revision(s) 137e69b48153dfd47851a1548eeefc6c7c843e92:nagachika
Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> --- .github/workflows/baseruby.yml | 2 +- .github/workflows/bundled_gems.yml | 2 +- .github/workflows/check_dependencies.yml | 2 +- .github/workflows/check_misc.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/compilers.yml | 2 +- .github/workflows/mingw.yml | 2 +- .github/workflows/mjit.yml | 2 +- .github/workflows/spec_guards.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- .github/workflows/wasm.yml | 2 +- .github/workflows/windows.yml | 2 +- .github/workflows/yjit-ubuntu.yml | 2 +- .github/workflows/yjit_asm_tests.yml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-)