summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2023-11-20merge revision(s) 9eac9d71786a8dbec520d0541a91149f01adf8ea: [Backport #19969]U.Nakamura
[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-07Ease the `Encoding::CompatibilityError` test failureNobuyoshi Nakada
At the time this test first started using `assert_raise_with_message`, it did not touch `Encoding.default_internal`.
2023-11-06merge revision(s) 4329554f171fdb483cafa672df5f2a08741940c5: [Backport #19985]U.Nakamura
[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-06merge revision(s) 19346c2336053b351673da030b00c704138252d8: [Backport #19754]U.Nakamura
[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-10-17merge revision(s) 96c5a4be7b0d72502001734770af0f4a735c544c: [Backport #19894]U.Nakamura
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-10merge revision(s) a28c5151f567cada0d2f5c0c3ec4df7f97b80784: [Backport #19855]U.Nakamura
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-09-05Allow waitpid(-1) to be woken if a waitpid(pid) call is pendingKJ Tsanaktsidis
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-07-26Revert "merge revision(s) 91c004885fc75a93cadf0094fa86ec3bd0ec25f5: ↵U.Nakamura
[Backport #19025]" This reverts commit e55dde3bdddbc595be12e7184a23e729647eb989.
2023-07-25merge revision(s) 91c004885fc75a93cadf0094fa86ec3bd0ec25f5: [Backport #19025]U.Nakamura
[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-25merge revision(s) 09295ea796900fb7b05d29e93364090e21598566: [Backport #19543]U.Nakamura
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-25Backport cvar clone bug fix for 19379 to 3.1 (#7889)Eileen M. Uchitelle
* 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-25String#slice! should clear the coderange when truncatingU.Nakamura
[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-06-26merge revision(s) 2c8f287: [Backport #19532]U.Nakamura
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-19merge revision(s) 1cdf8ab07b24ebd16e93621957196e8b1d67f2ba: [Backport #19323]U.Nakamura
[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-03-27merge revision(s) ↵nagachika
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-25merge revision(s) ↵nagachika
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-25merge revision(s) 790cf4b6d0475614afb127b416e87cfa39044d67: [Backport #19115]nagachika
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-25merge revision(s) 2e7e153a2af1456515d43b6381e38534b069b1c2: [Backport #19242]nagachika
[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-25merge revision(s) cd5cafa4a380e2459862b6e99ff0c381362ef1be: [Backport #18827]nagachika
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-25merge revision(s) c5475f42694eff35465c3332e0182c0611ca5918: [Backport #18748]nagachika
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-25Revert "Skip the test for [Bug #19316] for a while."nagachika
This reverts commit 82d763c94ad693a2af8086df8e0455b7de2d2ce3, and add exit: :any to assert_compile. Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2023-03-21merge revision(s) dd28c55a7cd6780dad637b4d6a20507fbfc6af4a: [Backport #19445]nagachika
[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(-)
2023-03-21merge revision(s) ↵nagachika
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(-)
2023-03-21merge revision(s) c6f84e918943a0bf8db6fee556fc53180d257510: [Backport #19398]nagachika
[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(+)
2023-03-21Skip the test for [Bug #19316] for a while.nagachika
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) 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) 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) 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(-)
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-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) 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-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-21merge revision(s) ab3cb29bd9bff9c16cfb9d19cc02026998282c12:nagachika
Avoid defining the same test class in multiple files Should fix issues with parallel testing sometimes not running all tests. This should be viewed skipping whitespace changes. Fixes [Bug #18731] --- test/-ext-/bignum/test_big2str.rb | 38 +- test/-ext-/bignum/test_bigzero.rb | 20 +- test/-ext-/bignum/test_div.rb | 38 +- test/-ext-/bignum/test_mul.rb | 260 ++++++------ test/-ext-/bignum/test_pack.rb | 653 +++++++++++++++---------------- test/-ext-/bignum/test_str2big.rb | 52 ++- test/-ext-/funcall/test_funcall.rb | 11 - test/-ext-/funcall/test_passing_block.rb | 5 + test/date/test_date_ractor.rb | 2 +- test/fileutils/clobber.rb | 5 +- test/fileutils/test_dryrun.rb | 2 +- test/fileutils/test_nowrite.rb | 2 +- test/fileutils/test_verbose.rb | 2 +- test/fileutils/visibility_tests.rb | 5 +- test/mkmf/base.rb | 225 ++++++----- test/mkmf/test_config.rb | 16 +- test/mkmf/test_constant.rb | 56 ++- test/mkmf/test_convertible.rb | 48 ++- test/mkmf/test_egrep_cpp.rb | 14 +- test/mkmf/test_find_executable.rb | 82 ++-- test/mkmf/test_flags.rb | 92 +++-- test/mkmf/test_framework.rb | 70 ++-- test/mkmf/test_have_func.rb | 18 +- test/mkmf/test_have_library.rb | 84 ++-- test/mkmf/test_have_macro.rb | 46 ++- test/mkmf/test_install.rb | 38 +- test/mkmf/test_libs.rb | 156 ++++---- test/mkmf/test_mkmf.rb | 14 +- test/mkmf/test_pkg_config.rb | 98 +++-- test/mkmf/test_signedness.rb | 38 +- test/mkmf/test_sizeof.rb | 74 ++-- test/optparse/test_acceptable.rb | 2 +- test/optparse/test_autoconf.rb | 4 +- test/optparse/test_bash_completion.rb | 4 +- test/optparse/test_cclass.rb | 2 +- test/optparse/test_did_you_mean.rb | 2 +- test/optparse/test_getopts.rb | 4 +- test/optparse/test_kwargs.rb | 4 +- test/optparse/test_noarg.rb | 6 +- test/optparse/test_optarg.rb | 2 +- test/optparse/test_placearg.rb | 2 +- test/optparse/test_reqarg.rb | 10 +- test/optparse/test_summary.rb | 2 +- test/optparse/test_zsh_completion.rb | 4 +- test/ruby/enc/test_emoji_breaks.rb | 207 +++++----- test/ruby/enc/test_grapheme_breaks.rb | 115 +++--- test/ruby/test_inlinecache.rb | 2 +- 47 files changed, 1280 insertions(+), 1356 deletions(-) delete mode 100644 test/-ext-/funcall/test_funcall.rb
2022-10-01merge revision(s) ↵nagachika
94cea3e4d0a60326bd95be762819eed8ccd59ca6,aa53d69aa21c4dfa2a78a1cec5cb34e9697b3d30,6b7d32a5e54088b6b4014529bbf2b4b8c1a96029,c6319026caa6c8f0f569f80011e8502349a04b14,aa490f9442c32cd0e1e449ac817f410bd5924c8b: [Backport #18435] Fix {Method,UnboundMethod}#super_method for zsuper methods * We need to resolve the zsuper method first, and then look the super method of that. --- proc.c | 25 ++++++++++++----------- spec/ruby/core/method/super_method_spec.rb | 15 +++----------- spec/ruby/core/unboundmethod/super_method_spec.rb | 16 ++++++--------- 3 files changed, 22 insertions(+), 34 deletions(-) Add specs for {Method,UnboundMethod}#owner of a zsuper method --- spec/ruby/core/method/owner_spec.rb | 6 ++++++ spec/ruby/core/unboundmethod/owner_spec.rb | 7 +++++++ 2 files changed, 13 insertions(+) Resolve zsuper method during lookup but preserve owner separately * See https://bugs.ruby-lang.org/issues/18729#note-34 * See [Bug #18729] --- proc.c | 109 +++++++++++++++++++++++++---------------------- test/ruby/test_method.rb | 66 +++++++++++++++++++++++----- 2 files changed, 114 insertions(+), 61 deletions(-) Extend tests for a zsuper method of which the method it resolved to has been removed --- test/ruby/test_method.rb | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) Reduce diff to proc.c @ b0b9f7201acab05c2a3ad92c3043a1f01df3e17f * So it's easy to review https://github.com/ruby/ruby/pull/6242 + https://github.com/ruby/ruby/pull/6467 and there are less changes overall. --- proc.c | 76 ++++++++++++++++++------------------------------ test/ruby/test_method.rb | 7 +++-- 2 files changed, 34 insertions(+), 49 deletions(-)
2022-09-25merge revision(s) a0040af6715d85f416f1282588974e151a8164eb: [Backport #18732]nagachika
[Win32] Fix mode of character/pipe device stat [Bug #18732] --- test/ruby/test_file_exhaustive.rb | 33 ++++++++++++++++++++++++++++----- win32/win32.c | 22 ++++++++++++++++------ 2 files changed, 44 insertions(+), 11 deletions(-)
2022-09-25merge revision(s) 68903df6f6fc548f3bf68fb09ee8b2495dcd28f0: [Backport #18922]nagachika
[Bug #18922] Normalize time at 24:00:00 UTC --- test/ruby/test_time.rb | 2 ++ time.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+)
2022-09-25merge revision(s) 65ae2bb2e045aa8b668d3c30515f5a6cb3eb68ad: [Backport #18902]nagachika
Thread#value: handle threads killed by a fork [Bug #18902] When a thread is killed because we forked, the `value` if left to `Qundef`. Returning it woudl crash the VM. --- test/ruby/test_thread.rb | 14 ++++++++++++++ thread.c | 4 ++++ 2 files changed, 18 insertions(+)
2022-09-10merge revision(s) db0e0dad1171456253ebd899e7e878823923d3d8: [Backport #18990]nagachika
Fix unexpected "duplicated key name" error in paren-less one line pattern matching [Bug #18990] --- parse.y | 16 ++++++++++++---- test/ruby/test_pattern_matching.rb | 12 ++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-)
2022-09-04merge revision(s) ↵nagachika
ef525b012a709077ea2797e8642fae0b61234063,dc9a13abeef5a2b936fbb55edc112b8b382a05e7: [Backport #18775] Explicit handling of frozen strings in `IO::Buffer#for`. (#5892) --- io_buffer.c | 122 +++++++++++++++++++++++++++++++++++--------- test/ruby/test_io_buffer.rb | 36 +++++++------ 2 files changed, 117 insertions(+), 41 deletions(-) Fix rdoc of IO::Buffer [ci skip] --- io_buffer.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
2022-09-04merge revision(s) 6d3f447aecfb56f7d3edbdf9cc68e748e150d7d8: [Backport #18631]nagachika
Fix multiplex backreferencs near end of string in regexp match Idea from Jirka Marsik. Fixes [Bug #18631] --- regexec.c | 6 ++++-- test/ruby/test_regexp.rb | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-)
2022-09-04merge revision(s) d8189ed23f02dd197453279aeee9be1785337d4f: [Backport #18670]nagachika
Return only captured range in `MatchData` [Bug #18670] --- re.c | 2 +- test/ruby/test_regexp.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
2022-09-03merge revision(s) ↵nagachika
8212aab81a77a2a91fb7c1681b4968171193b48f,209631a45f9682dedf718f4b4a140efe7d21a6fc: [Backport #18435] Make Object#method and Module#instance_method not skip ZSUPER methods Based on https://github.com/jeremyevans/ruby/commit/c95e7e5329140f640b6497905485761f3336d967 Among other things, this fixes calling visibility methods (public?, protected?, and private?) on them. It also fixes #owner to show the class the zsuper method entry is defined in, instead of the original class it references. For some backwards compatibility, adjust #parameters and #source_location, to show the parameters and source location of the method originally defined. Also have the parameters and source location still be shown by #inspect. Clarify documentation of {Method,UnboundMethod}#owner. Add tests based on the description of https://bugs.ruby-lang.org/issues/18435 and based on https://github.com/ruby/ruby/pull/5356#issuecomment-1005298809 Fixes [Bug #18435] [Bug #18729] Co-authored-by: Benoit Daloze <eregontp@gmail.com> --- proc.c | 63 +++++++++++++++++++++++++++++++++++------------- test/ruby/test_method.rb | 59 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 100 insertions(+), 22 deletions(-) Consider resolved-through-zsuper methods equal for compatibility * Fixes https://bugs.ruby-lang.org/issues/18751 --- proc.c | 65 +++++++++++------------- spec/ruby/core/unboundmethod/equal_value_spec.rb | 37 ++++++++++++++ test/ruby/test_method.rb | 18 +++++++ 3 files changed, 86 insertions(+), 34 deletions(-)
2022-06-18merge revision(s) 3bb70a6924ddd83f90b508b5bbc4d5629b8a41c6: [Backport #18673]nagachika
Fix using anonymous block in method accepting explicit keywords Record block ID before vtable_pop, so the incorrect one doesn't override it. Fixes [Bug #18673] --- parse.y | 1 + test/ruby/test_syntax.rb | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+)
2022-06-18merge revision(s) 0c6e24d102e894a7211a596e6aa95828b1cf4406: [Backport #18600]nagachika
Fix visibility of alias of zsuper methods This was broken by 71c746379d5872e250d90ae45c585760afaf9516. Fixes [Bug #18600] --- test/ruby/test_alias.rb | 10 ++++++++++ vm_method.c | 1 + 2 files changed, 11 insertions(+)
2022-05-03merge revision(s) 44c44b9b4af14f42a0dc6df9287c45d9689847bb:nagachika
Ignore warnings at reading debug info for now Something seems changed on FreeBSD 13. --- test/ruby/test_rubyoptions.rb | 1 + 1 file changed, 1 insertion(+)
2022-05-01merge cf2bbcfff2985c116552967c7c4522f4630f2d18 partially.nagachika
Add the relevant test code for 73f45e5e96ccc13a131f7c0122cf8600ce5b930f.
2022-04-12Fix dtoa buffer overrunNARUSE, Yui