summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-08-04Run interrupt test except on Windowsaycabta
Notes: Merged: https://github.com/ruby/ruby/pull/4704
2021-08-04Add a load path to require 'helper'aycabta
Notes: Merged: https://github.com/ruby/ruby/pull/4704
2021-08-04Show the log of test_interrupt_in_other_thread when failedaycabta
Notes: Merged: https://github.com/ruby/ruby/pull/4704
2021-08-04Check the existence of the test classesaycabta
Notes: Merged: https://github.com/ruby/ruby/pull/4704
2021-08-04Add a test for handling SIGINT in other threadaycabta
Notes: Merged: https://github.com/ruby/ruby/pull/4704
2021-08-03Fix potential hang when joining threads.Samuel Williams
If the thread termination invokes user code after `th->status` becomes `THREAD_KILLED`, and the user unblock function causes that `th->status` to become something else (e.g. `THREAD_RUNNING`), threads waiting in `thread_join_sleep` will hang forever. We move the unblock function call to before the thread status is updated, and allow threads to join as soon as `th->value` becomes defined. This reverts commit 6505c77501f1924571b2fe620c5c7b31ede0cd22. Notes: Merged: https://github.com/ruby/ruby/pull/4689
2021-08-03Add keyrest to ruby2_keywords parameters [Bug #18011]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4705
2021-08-02Stop infinite object allocation to get rid of OOM killerNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4697
2021-07-31[ruby/error_highlight] Keep it work if paren exists after receiverMasataka Pocke Kuwabara
https://github.com/ruby/error_highlight/commit/b79d679bbd
2021-07-30Fix bundled gems locationsNobuyoshi Nakada
Changed since 55bf0ef1aa7c936b564b883196de1ace4be4cc7e.
2021-07-29Skip test_ensure_after_nomemoryerrorJeremy Evans
This test appears to cause failures in some environments.
2021-07-29Improve performance of Integer#digitsJeremy Evans
This speeds up performance by multiple orders of magnitude for large integers. Fixes [Bug #14391] Co-authored-by: tompng (tomoya ishida) <tomoyapenguin@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4584
2021-07-29Make RubyVM::AbstractSyntaxTree.of raise for method/proc created in evalJeremy Evans
This changes Thread::Location::Backtrace#absolute_path to return nil for methods/procs defined in eval. If the realpath of an iseq is nil, that indicates it was defined in eval, in which case you cannot use RubyVM::AbstractSyntaxTree.of. Fixes [Bug #16983] Co-authored-by: Koichi Sasada <ko1@atdot.net> Notes: Merged: https://github.com/ruby/ruby/pull/4519
2021-07-30Use test-unit assertionsaycabta
Notes: Merged: https://github.com/ruby/ruby/pull/4693
2021-07-30[ruby/reline] Fixed Ctrl+Enter key in Windows.SilverPhoenix99
https://github.com/ruby/reline/commit/0c38e39023
2021-07-30[ruby/reline] Check empty .inputrcaycabta
https://github.com/ruby/reline/commit/b60b3b76cd
2021-07-30[ruby/reline] Windows cmd: Don't type anything when pressing ALT keys aloneLars Kanis
Fixes #298 https://github.com/ruby/reline/commit/72acfcd27a
2021-07-30[ruby/reline] Use "omit" instead of "return"aycabta
https://github.com/ruby/reline/commit/940cdaa301
2021-07-30[ruby/reline] Add Terminfo testsaycabta
https://github.com/ruby/reline/commit/17721e477e
2021-07-29Do not check pending interrupts when running finalizersJeremy Evans
This fixes cases where exceptions raised using Thread#raise are swallowed by finalizers and not delivered to the running thread. This could cause issues with finalizers that rely on pending interrupts, but that case is expected to be rarer. Fixes [Bug #13876] Fixes [Bug #15507] Co-authored-by: Koichi Sasada <ko1@atdot.net> Notes: Merged: https://github.com/ruby/ruby/pull/4366
2021-07-29Renamed thraed_fd_close as thread_fdNobuyoshi Nakada
2021-07-29Fix test failure of 60b02db5161625dd5f7d22d31989dd966837333c with WindowsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4691
2021-07-29Partly picking ↵Hiroshi SHIBATA
https://github.com/ruby/error_highlight/commit/25ef7dbeda4f2cfcad1675f70319401ef4916f40#diff-1ce41a048bf2c08aa7bf25b741e9d3a4e08ea03f0d80bc6b8ee6d1c3c259704dR1022
2021-07-29[ruby/psych] require 'delegate' explicitlyPavel Rosický
https://github.com/ruby/psych/commit/51a9ce13db
2021-07-29[ruby/net-http] Enforce write timeout when body_stream is usedMiguel Teixeira
The existing implementation of `Net::HTTP#write_timeout` relies on `Net::BefferedIO` to trigger the `Net::WriteTimeout` error. This commit changes `send_request_with_body_stream` to remove the optimization that was making `Net::HTTP#write_timeout` not work when `body_stream` is used. Open issue: https://bugs.ruby-lang.org/issues/17933 https://github.com/ruby/net-http/commit/a0fab1ab52
2021-07-29Partly picked from ↵Hiroshi SHIBATA
https://github.com/ruby/ostruct/commit/20d0b8c065392a22ba6d74194cf116755f38337f
2021-07-29[ruby/set] Allow Set#intersect? and #disjoint? to accept array argumentJeremy Evans
Implements [Feature #17838] https://github.com/ruby/set/commit/d9b389bafa
2021-07-29test/socket/test_socket.rb: skip on SolarisYusuke Endoh
The test fails on Solaris 10. Maybe due to the IPv6 configuration on the server, but I have no idea at all. I've asked @ngoto to investigate the issue, so will tentatively skip the tests on Solaris http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20210729T040002Z.fail.html.gz
2021-07-29use me->def instead of me for opt_tableKoichi Sasada
`vm_opt_method_table` is me=>bop table to manage the optimized methods (by specialized instruction). However, `me` can be invalidated to invalidate the method cache entry. [Bug #17725] To solve the issue, use `me-def` instead of `me` which simply copied at invalidation timing. A test by @jeremyevans https://github.com/ruby/ruby/pull/4376 Notes: Merged: https://github.com/ruby/ruby/pull/4493
2021-07-28Handle Timeout::Error instead of NoMemoryError in testJeremy Evans
Solaris 11 CI times out instead of raising NoMemoryError for large allocations, so it cannot test ensure after NoMemoryError.
2021-07-28Update to latest uriBenoit Daloze
* https://github.com/ruby/uri/commit/bc47bf71df2b2e9cea09d0b2684ceac7355e42a0 * To include the fix from https://github.com/ruby/uri/pull/27
2021-07-28[ruby/zlib] Synchronize access to zstream to prevent segfault in ↵Jeremy Evans
multithreaded use I'm not sure whether this handles all multithreaded use cases, but this handles the example that crashes almost immediately and does 10,000,000 total deflates using 100 separate threads. To prevent the tests from taking forever, the committed test for this uses only 10,000 deflates across 10 separate threads, which still causes a segfault in the previous implementation almost immediately. Fixes [Bug #17803] https://github.com/ruby/zlib/commit/4b1023b3f2
2021-07-28[ruby/digest] Use pend instead of skipHiroshi SHIBATA
https://github.com/ruby/digest/commit/82fb618157
2021-07-28Suppress "possibly useless use of * in void context" warningNobuyoshi Nakada
2021-07-28Revert "Fix potential hang when joining threads."Yusuke Endoh
This reverts commit 13f8521c630a15c87398dee0763e95f59c032a94. http://rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20210727T230009Z.fail.html.gz http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20210728T000009Z.fail.html.gz This revert is to confirm whether the commit is the cause. If the failures consistently occur after this revert, I'll reintroduce the commit.
2021-07-27Make Float#floor with ndigits argument handle errorJeremy Evans
The previous implementation could result in a returned float that is 1/(10**ndigits) too low. First try adding one before dividing, and if that results in a value that is greater than the initial number, then try the original calculation. Spec added for ciel, but the issue doesn't appear to affect ciel, at least not for the same number. If the issue does effect ciel, a similar fix could probably work for it. Fixes [Bug #18018] Notes: Merged: https://github.com/ruby/ruby/pull/4681
2021-07-27Fix infinite loop in ensure after NoMemoryErrorJeremy Evans
VM patch from wanabe. Test based on example from buzztaiki (Taiki Sugawara). Test fails when compiles with -DRUBY_DEBUG, as that can can use rb_bug instead of NoMemoryError, which doesn't allow testing this case. Test also fails on MingW, as RangeError is used instead of NoMemoryError. Skip the test in either case. Fixes [Bug #15779] Notes: Merged: https://github.com/ruby/ruby/pull/4577
2021-07-27Deal with Unicode ranges in the file emoji-sequences.txtMartin Dürst
Detect Unicode ranges and loop over them. This fixes issue #18028.
2021-07-27Adjust test/ruby/enc/test_emoji_breaks.rb to handle Emoji Version 13.1Martin Dürst
Deal with the issue that the emoji files in emoji/13.1 have Unicode Emoji version 13.1, but at the same time the files in 13.0.0/ucd/emoji are still at Emoji version 13.0. Specifically: - Add a version attribute to TestEmojiBreaks::BreakFile - Take the version for emoji-variant-sequences.txt from the Unicode version, removing the last two characters. - Improve information in exceptions for file name and version mismatches.
2021-07-27[ruby/uri] User assert_ractor for test case of RactorHiroshi SHIBATA
https://github.com/ruby/uri/commit/bbf8b44dba
2021-07-27[ruby/uri] Add proper Ractor support to URIBenoit Daloze
* Using a module to map scheme name to scheme class, which also works with Ractor. * No constant redefinition, no ObjectSpace, still fast lookup for initial schemes. https://github.com/ruby/uri/commit/883567fd81
2021-07-27[ruby/uri] Revert "Fix to support Ruby 3.0 Ractor"Benoit Daloze
* This reverts commit 1faa4fdc161d7aeebdb5de0c407b923beaecf898. * It has too many problems, see https://github.com/ruby/uri/pull/22 for discussion. https://github.com/ruby/uri/commit/b959da2dc9
2021-07-27[ruby/uri] Fix to support Ruby 3.0 Ractorkvokka
https://github.com/ruby/uri/commit/1faa4fdc16
2021-07-27Fix potential hang when joining threads.Samuel Williams
If the thread termination invokes user code after `th->status` becomes `THREAD_KILLED`, and the user unblock function causes that `th->status` to become something else (e.g. `THREAD_RUNNING`), threads waiting in `thread_join_sleep` will hang forever. We move the unblock function call to before the thread status is updated, and allow threads to join as soon as `th->value` becomes defined. Notes: Merged: https://github.com/ruby/ruby/pull/4660
2021-07-27Run in a separated process to run finalizers certainlyNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4685 Merged-By: nobu <nobu@ruby-lang.org>
2021-07-27test/ruby/test_parse.rb: Prevent an "unused variable" warningYusuke Endoh
2021-07-27Try GC more during suppressing the warningNobuyoshi Nakada
2021-07-27Make GCed during suppressing the warningNobuyoshi Nakada
Consume the VM stack more, to make the target object get GCed with more probability during suppressing the warning.
2021-07-27[rubygems/rubygems] Check requirements classesNobuyoshi Nakada
Mitigate the security risk: https://devcraft.io/2021/01/07/universal-deserialisation-gadget-for-ruby-2-x-3-x.html https://github.com/rubygems/rubygems/commit/141c2f4388
2021-07-27[rubygems/rubygems] Remove all `syck` traces from `rubygems`David Rodríguez
After reading [this blog post](https://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html), published almost 10 years ago already, my understanding is that this problem could come up in two ways: * Rubygems.org serving corrupted gemspecs". As far as I understand this was fixed in rubygems.org a lot time ago, since https://github.com/rubygems/rubygems.org/pull/331. * Clients having a ten years old gemspec cache with some of these bad gemspecs. In this case, there's no easy solution but I think ten years is enough and rebuilding the cache should do the trick. So, I think it's time we remove this. https://github.com/rubygems/rubygems/commit/afcb15d556