summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
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(-)
2022-01-30merge revision(s) 9e0a91d0640600f2dfd7fc1d5fae6667019c9ca5: [Backport #18458]NARUSE, Yui
Don't segfault if Warning.warn is undefined Check that there is a method entry for the method before passing it to rb_method_entry_arity. Fixes [Bug #18458] --- error.c | 3 ++- test/ruby/test_exception.rb | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
2022-01-30merge revision(s) 0dc7816c4350683ccd020f5759eee4914de0085d: [Backport #18434]NARUSE, Yui
Make RubyVM::AST.of work with code written in `-e` command-line option [Bug #18434] --- ast.c | 11 +++++++---- test/ruby/test_ast.rb | 5 +++++ 2 files changed, 12 insertions(+), 4 deletions(-)
2021-12-25Raise proper exception when month argument is not a nameNobuyoshi Nakada
https://bugs.ruby-lang.org/issues/17485#change-89871 (cherry picked from commit 0867b638aff9ec192ca420a44ffa5a77c892e8f2)
2021-12-25[ruby/openssl] Add tast cases to OpenSSL::BN using ractorYusuke Nakamura
OpenSSL::BN has been make ractor-safed in 9e7cf9e , but there was no test. And to use 'ractor' annotation, update test-unit to v3.4.6 or higher. https://github.com/ruby/openssl/commit/7541a66911
2021-12-25[ruby/reline] Escape newline(s) in dynamic promptaycabta
https://github.com/ruby/reline/commit/9b209ee1ea
2021-12-25[ruby/reline] Escape newline(s) in promptaycabta
https://github.com/ruby/reline/commit/b545459fca
2021-12-25Increase wait timeaycabta
2021-12-25Wait for output results to test correctlyaycabta
2021-12-24Revert "Revert "Replace an deprecated constant with a new one in did_you_mean""Yuki Nishijima
This reverts commit 1527f7569b0412f3bc7ac98a3461e59a4891ed96.
2021-12-24Sync did_you_meanYuki Nishijima
2021-12-24Output log after loading class to testaycabta
2021-12-24Add logging about timeoutaycabta
2021-12-24Kill process before assertion failsaycabta
2021-12-24[ruby/reline] Implement em_kill_lineaycabta
https://github.com/ruby/reline/commit/9fca6ceb45
2021-12-24[ruby/reline] Rename the wrong name "em-kill-line" with the correct name ↵aycabta
"unix-line-discard" https://github.com/ruby/reline/commit/da7af35d1f
2021-12-24[ruby/reline] Bind ed-kill-line to C-u on emacs modeaycabta
https://github.com/ruby/reline/commit/9ab99574f5
2021-12-24Move embedded lines outside the here documentNobuyoshi Nakada
So that the actually run test code corresponds to the source file line-by-line.
2021-12-24Set time limit for waiting for terminating process within a testaycabta
Notes: Merged: https://github.com/ruby/ruby/pull/5339
2021-12-24[ruby/reline] Fix test input_keys to handle "hankaku" characters correctly ↵Yusuke Endoh
on Windows The method "input_keys" in test/reline/helper.rb handles a single-byte and 8-bit charater as an input with the meta key. However, "test_halfwidth_kana_width_dakuten" in test/reline/test_key_actor_emacs.rb uses a string that contains "hankaku" characters. A "hankaku" character is not with the meta key, but it is a single-byte and 8-bit character on Windows-31J encoding, which confused "input_keys" method. This caused the following error. https://ci.appveyor.com/project/ruby/ruby/builds/41997092/job/ejm77qxgvnlpdwvg ``` 1) Failure: Reline::KeyActor::Emacs::Test#test_halfwidth_kana_width_dakuten [C:/projects/ruby/test/reline/test_key_actor_emacs.rb:2311]: <"\xB6\xDE\xB7\xDE\xB9\xDE\xBA\xDE" (#<Encoding:Windows-31J>)> expected but was <"\e^\e^\e^\e:\e^" (#<Encoding:Windows-31J>)> in <Terminal #<Encoding:Windows-31J>> . <8> expected but was <10>. Finished tests in 1045.472722s, 19.3922 tests/s, 2609.4320 assertions/s. ``` This change introduces "input_raw_keys" that does not convert a single-byte and 8-bit character to "with the meta key", and use it in the test in question. https://github.com/ruby/reline/commit/f6ae0e5d19
2021-12-24[ruby/csv] test: reduce size for stability on GitHub ActionsSutou Kouhei
https://github.com/ruby/csv/commit/68461aead5 Notes: Merged: https://github.com/ruby/ruby/pull/5336
2021-12-24[ruby/csv] Revert "parser: fix a keep bug that some texts may be dropped ↵Sutou Kouhei
unexpectedly" This reverts commit https://github.com/ruby/csv/commit/5c6523da0a61. This introduces another pbolem. We should try again later. https://github.com/ruby/csv/commit/43a1d6fff1 Notes: Merged: https://github.com/ruby/ruby/pull/5336
2021-12-24[ruby/csv] parser: fix a keep bug that some texts may be dropped unexpectedlySutou Kouhei
Ruby: [Bug #18245] [ruby-core:105587] Reported by Hassan Abdul Rehman. https://github.com/ruby/csv/commit/5c6523da0a Notes: Merged: https://github.com/ruby/ruby/pull/5336
2021-12-24[ruby/csv] Add handling for ambiguous parsing options ↵adamroyjones
(https://github.com/ruby/csv/pull/226) GitHub: fix GH-225 With Ruby 3.0.2 and csv 3.2.1, the file ```ruby require "csv" File.open("example.tsv", "w") { |f| f.puts("foo\t\tbar") } CSV.read("example.tsv", col_sep: "\t", strip: true) ``` produces the error ``` lib/csv/parser.rb:935:in `parse_quotable_robust': TODO: Meaningful message in line 1. (CSV::MalformedCSVError) ``` However, the CSV in this example is not malformed; instead, ambiguous options were provided to the parser. It is not obvious (to me) whether the string should be parsed as - `["foo\t\tbar"]`, - `["foo", "bar"]`, - `["foo", "", "bar"]`, or - `["foo", nil, "bar"]`. This commit adds code that raises an exception when this situation is encountered. Specifically, it checks if the column separator either ends with or starts with the characters that would be stripped away. This commit also adds unit tests and updates the documentation. https://github.com/ruby/csv/commit/cc317dd42d Notes: Merged: https://github.com/ruby/ruby/pull/5336
2021-12-24[ruby/csv] Fix typos [ci skip] (https://github.com/ruby/csv/pull/224)Nobuyoshi Nakada
https://github.com/ruby/csv/commit/27c0b66c8f Notes: Merged: https://github.com/ruby/ruby/pull/5336
2021-12-24[ruby/reline] Add encoding info to an assertion of editing lineaycabta
https://github.com/ruby/reline/commit/22d9262d79
2021-12-24Merge RubyGems-3.3.2 and Bundler-2.3.2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5334
2021-12-24[ruby/bigdecimal] Fix the result precision of BigDecimal#divmodKenta Murata
https://github.com/ruby/bigdecimal/commit/a32f6cb9e2
2021-12-24[ruby/bigdecimal] Let BigDecimal#quo accept precisionKenta Murata
Fix GH-214. https://github.com/ruby/bigdecimal/commit/13e0e93f37
2021-12-24[ruby/bigdecimal] Allow passing both float and precision in BigDecimal#divKenta Murata
Fix GH-212. https://github.com/ruby/bigdecimal/commit/900bb7fcf5
2021-12-24[ruby/bigdecimal] Add BigDecimal#precision_scaleKenta Murata
https://github.com/ruby/bigdecimal/commit/c019caeaba
2021-12-24[ruby/bigdecimal] Add BigDecimal#scaleKenta Murata
Fixes GH-198. https://github.com/ruby/bigdecimal/commit/4fbec55680
2021-12-24[ruby/bigdecimal] Fix BigDecimal#precision for single DECDIG caseKenta Murata
Fix GH-205 https://github.com/ruby/bigdecimal/commit/7d198394a2
2021-12-24[ruby/bigdecimal] Fix the precision of the adjusted quotientKenta Murata
https://github.com/ruby/bigdecimal/commit/8dc8cd339d
2021-12-24[ruby/bigdecimal] Let BigDecimal_DoDivmod use the same precision calculation ↵Kenta Murata
as BigDecimal_divide https://github.com/ruby/bigdecimal/commit/11cb2c8840
2021-12-24[ruby/bigdecimal] Use larger precision in divide for irrational or recurring ↵Kenta Murata
results Just in case for irrational or recurring results, the precision of the quotient is set to at least more than 2*Float::DIG plus alpha. [Bug #13754] [Fix GH-94] https://github.com/ruby/bigdecimal/commit/99442c75d3
2021-12-24[ruby/bigdecimal] Add tests for the issue GH-192Kenta Murata
https://github.com/ruby/bigdecimal/commit/e864828b47
2021-12-24[ruby/bigdecimal] Use values in RbConfig::LIMITS in testKenta Murata
https://github.com/ruby/bigdecimal/commit/14e35f5a70
2021-12-24[ruby/bigdecimal] Fix the style in test/bigdecimal/test_bigdecimal.rbKenta Murata
https://github.com/ruby/bigdecimal/commit/aa31ef2f33
2021-12-24[ruby/bigdecimal] Fix negative Bignum conversionJean Boussier
Introduced in https://github.com/ruby/bigdecimal/commit/4792a917d806 `rb_absint_size` return the number of bytes needed to fit the absolute integer, but negative integers need the sign, so one more bit, and potentially one more byte. https://github.com/ruby/bigdecimal/commit/0f3d5d0eb7
2021-12-24[ruby/bigdecimal] Fix test against #196Kenta Murata
https://github.com/ruby/bigdecimal/commit/a834eb92a2