summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-10-08Merge RubyGems-3.3.23 and Bundler-2.3.23Hiroshi SHIBATA
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) cf7d07570f50ef9c16007019afcff11ba6500d70: [Backport #18938]nagachika
Dump non-ASCII char as unsigned Non-ASCII code may be negative on platforms plain char is signed. --- ext/objspace/objspace_dump.c | 2 +- test/objspace/test_objspace.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-)
2022-09-25merge revision(s) 70f69f85395f5735429cd45136d7de2742f08b72: [Backport #18941]nagachika
[ruby/fileutils] Fix mkdir_p hanging on Windows when trying to create a file on a offline drive https://github.com/ruby/fileutils/commit/9cc6a082d7 --- lib/fileutils.rb | 2 +- test/fileutils/test_fileutils.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
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-17Merge RubyGems-3.3.22 and Bundler-2.3.22Hiroshi SHIBATA
2022-09-17Merge openssl-3.0.1Kazuki Yamaguchi
The changes can be found at: https://github.com/ruby/openssl/compare/v3.0.0...v3.0.1
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 csv-3.2.5Hiroshi SHIBATA
2022-09-03Merge csv-3.2.4Hiroshi SHIBATA
2022-09-03Merge csv-3.2.3Hiroshi SHIBATA
2022-09-03Merge RubyGems-3.3.21 and Bundler-2.3.21Hiroshi SHIBATA
2022-09-03Merge RubyGems-3.3.20 and Bundler-2.3.20Hiroshi SHIBATA
2022-09-03Merge RubyGems-3.3.19 and Bundler-2.3.19Hiroshi SHIBATA
2022-09-03Merge RubyGems-3.3.18 and Bundler-2.3.18Hiroshi SHIBATA
2022-09-03Merge RubyGems-3.3.17 and Bundler-2.3.17Hiroshi SHIBATA
2022-09-03Merge RubyGems-3.3.16 and Bundler-2.3.16Hiroshi SHIBATA
2022-09-03Merge RubyGems-3.3.15 and Bundler-2.3.15Hiroshi SHIBATA
2022-09-03Merge RubyGems-3.3.14 and Bundler-2.3.14Hiroshi SHIBATA
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-18Merge RubyGems-3.3.13 and Bundler-2.3.13Hiroshi SHIBATA
2022-05-18Merge Psych-4.0.4Hiroshi SHIBATA
2022-05-18[rubygems/rubygems] Skip test for cargo builderHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/60ca4ad9c6
2022-05-18[rubygems/rubygems] Move testing_ruby_repo into test helperHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/6590debe55
2022-05-18Merge RubyGems-3.3.12 and Bundler-2.3.12Hiroshi SHIBATA
2022-05-18Merge RubyGems-3.3.11 and Bundler-2.3.11Hiroshi SHIBATA
2022-05-18Merge RubyGems-3.3.8 and Bundler-2.3.8Hiroshi SHIBATA
2022-05-05merge revision(s) 1cbdedec895070df1df96d05370cf8da084ab6fa:nagachika
[ruby/zlib] Mask checksums to lower 32bits Upper bits affect the result of `crc32` in zlib 1.2.12. https://github.com/ruby/zlib/commit/9ab6d04af1 --- ext/zlib/zlib.c | 12 +++++++++--- test/zlib/test_zlib.rb | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-)
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-03merge revision(s) ↵nagachika
17e09f033c4d3b786672ba16d2c5d935482a2fad,bfc697f1e26f1406c45ec7309ca0d4c0b5ecedd6: Skip three tests on FreeBSD 13 Some tests that use signals frequently fail randomly on FreeBSD 13. Maybe something around signals has changed in FreeBSD 13. This change skips them tentatively. --- test/excludes/TestThread.rb | 9 +++++++++ test/excludes/TestThreadQueue.rb | 9 +++++++++ test/io/console/test_io_console.rb | 9 ++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 test/excludes/TestThreadQueue.rb test/io/console/test_io_console.rb: parens needed --- test/io/console/test_io_console.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2022-05-03merge revision(s) ↵nagachika
b4fd0e0c73aac0cae23237743bbf7dc1b1315b6b,dfe7faa6b60464c184fede59f227341f6c57cc97: Exclude TestThread#test_signal_at_join on FreeBSD 13 for now [ci skip] --- test/excludes/TestThread.rb | 3 +++ 1 file changed, 3 insertions(+) exclude name must be Regexp or Symbol https://github.com/ruby/ruby/blob/fdf0f8d81487560f5837dc7e3888a96f7c2b4ec9/tool/lib/test/unit.rb#L1273-L1290 --- test/excludes/TestThread.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2022-05-01merge cf2bbcfff2985c116552967c7c4522f4630f2d18 partially.nagachika
Add the relevant test code for 73f45e5e96ccc13a131f7c0122cf8600ce5b930f.
2022-04-12Fix dtoa buffer overrunNARUSE, Yui
2022-02-17merge revision(s) 496591de96b261b8789332c7f8b2bfbd17658955: [Backport #18578]NARUSE, Yui
st.c: Do not clear entries_bound when calling Hash#shift for empty hash tab->entries_bound is used to check if the bins are full in rebuild_table_if_necessary. Hash#shift against an empty hash assigned 0 to tab->entries_bound, but didn't clear the bins. Thus, the table is not rebuilt even when the bins are full. Attempting to add a new element into full-bin hash gets stuck. This change stops clearing tab->entries_bound in Hash#shift. [Bug #18578] --- st.c | 1 - test/ruby/test_hash.rb | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
2022-02-08Merge ipaddr-1.2.4 (#5526)Hiroshi SHIBATA
[Bug #18570]
2022-02-07merge revision(s) c79d2e54748f52c5023b0a1ee441561df9826c17: [Backport #18562]NARUSE, Yui
Fix TAG_THROW through require [Bug #18562] Previously this was being incorrectly swapped with TAG_RAISE in the next line. This would end up checking the T_IMEMO throw_data to the exception handling (which calls Module#===). This happened to not break existing tests because Module#=== returned false when klass is NULL. This commit handles throw from require correctly by jumping to the tag retaining the TAG_THROW state. --- load.c | 2 +- test/ruby/test_exception.rb | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-)
2022-02-03merge revision(s) ↵NARUSE, Yui
7ff1bf317887c0d7b21e91ad548d07b9f05c540c,e89d80702bd98a8276243a7fcaa2a158b3bfb659: [Backport #18516] An alias can suppress method redefinition warning --- test/ruby/test_alias.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) Fix memory leak at the same named alias [Bug #18516] When aliasing a method to the same name method, set a separate bit flag on that method definition, instead of the reference count increment. Although this kind of alias has no actual effect at runtime, is used as the hack to suppress the method re-definition warning. --- method.h | 1 + test/ruby/test_alias.rb | 18 ++++++++++++++++++ vm_method.c | 9 ++++++++- 3 files changed, 27 insertions(+), 1 deletion(-)
2022-02-02Merge pull request #5482 from hsbt/rubygems-3-3-bundler-2-3Hiroshi SHIBATA
Merge RubyGems 3.3.x and Bundler 2.3.x
2022-02-01merge revision(s) ↵NARUSE, Yui
f27eb8148f5a72bbacfebfecc7de9305471bb5c9,d75f7078c831d45ab5ba2fae4fbb308d01a21e46,d5836db1b398a7936b0461b3011db66f6cc8c490: [Backport #18443] Sync io-console gem. --- ext/io/console/console.c | 8 ++++++-- test/io/console/test_io_console.rb | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) [ruby/io-console] bump up to 0.5.11 https://github.com/ruby/io-console/commit/ad3805200c --- ext/io/console/io-console.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Fix `Leaked file descriptor: TestIO_Console#test_console_kw` ``` Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty> ``` --- test/io/console/test_io_console.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
2022-01-31merge revision(s) ↵NARUSE, Yui
5c7af72304d0ad33cd3f21b24a4bc44e8acd5b2c,d650b17686d49c2ce8e6a87039861154e93d4621: [Backport #18497] Assuming EXIT_SUCCESS equals 0 is not portable --- test/ruby/test_fiber.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) `rb_fiber_terminate` must not return [Bug #18497] In a forked process from a fiber, the fiber becomes the only fiber, `fiber_switch` does nothing as there is no other fibers, `rb_fiber_terminate` does not terminate the fiber. In that case, reaches the end of `fiber_entry` finaly, which is declared as "COROUTINE" and should never return. --- cont.c | 3 ++- eval_intern.h | 2 +- test/fiber/test_process.rb | 15 +++++++++++++++ test/ruby/test_fiber.rb | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-)
2022-01-31merge revision(s) f3c77bd480834f2835fe6fef5c0475336248dbde: [Backport #18489]NARUSE, Yui
Fix the placeholder subclass entry skipping [Bug #18489] --- class.c | 3 +-- test/ruby/test_module.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-)
2022-01-31merge revision(s) ae5458f228a5477383e9c00425d85d50a3867817: [Backport #18475]NARUSE, Yui
thread.c: Convert TAG_BREAK to a normal exception at thread top-level [Bug #18475] --- test/ruby/test_enum.rb | 11 +++++++++++ thread.c | 3 +++ 2 files changed, 14 insertions(+)
2022-01-30merge revision(s) a79c59472df38297c246b27713c277f2edaefa7a: [Backport #18292]NARUSE, Yui
Allow include before calling Module#initialize This is to allow Module subclasses that include modules before calling super in the subclass's initialize. Remove rb_module_check_initializable from Module#initialize. Module#initialize only calls module_exec if a block is passed, it doesn't have other issues that would cause problems if called multiple times or with an already initialized module. Move initialization of super to Module#allocate, though I'm not sure it is required there. However, it's needed to be removed from Module#initialize for this to work. Fixes [Bug #18292] --- class.c | 1 + object.c | 1 - test/ruby/test_module.rb | 10 ++++++++++ 3 files changed, 11 insertions(+), 1 deletion(-)