summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-11-08[Feature #18290] Remove tests that test use of rb_gc_force_recyclePeter Zhu
Remove tests that assume objects get force recycled. Notes: Merged: https://github.com/ruby/ruby/pull/5096
2021-11-07Refine the error message for hidden variablesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5035
2021-11-07rb_id_serial_to_id: return unregistered ID as an internal IDNobuyoshi Nakada
```ruby def foo(*); ->{ super }; end ``` This code makes anonymous parameters which is not registered as an ID. The problem is that when Ractors try to scan `getlocal` instructions, it puts the Symbol corresponding to the parameter in to a hash. Since it is not registered, we end up with a strange exception. This commit wraps the unregistered ID in an internal ID so that we get the same exception for `...` as `*`. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Co-Authored-By: John Hawthorn <john@hawthorn.email> Notes: Merged: https://github.com/ruby/ruby/pull/5035
2021-11-05YJIT: Implement checkkeyword (#5083)John Hawthorn
Co-authored-by: John Crepezzi <john.crepezzi@gmail.com> Co-authored-by: John Crepezzi <john.crepezzi@gmail.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2021-11-05Delegate keywords from Enumerable#to_a to #eachJeremy Evans
Fixes [Bug #18289] Notes: Merged: https://github.com/ruby/ruby/pull/5086
2021-11-05[rubygems/rubygems] Fix `ruby setup.rb` command when `--prefix` is passedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8d04092f6e
2021-11-05[rubygems/rubygems] Bin dir should fall inside destdirDavid Rodríguez
Since that's what happens in real life when `--destdir` is passed. https://github.com/rubygems/rubygems/commit/55637bdc8a
2021-11-05[rubygems/rubygems] Remove unnecessary test setupDavid Rodríguez
The method being unit tested here doesn't use `RbConfig::CONFIG["bindir"]`. https://github.com/rubygems/rubygems/commit/d3f092ad14
2021-11-05[rubygems/rubygems] Simplify `--destdir` testDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0571fd1ec6
2021-11-05[rubygems/rubygems] Refactor setup tests to not always pass `--prefix`David Rodríguez
Standard usage should be tested by default. I will add a test for `--prefix` once I fix that option since it's not working correctly at the moment. https://github.com/rubygems/rubygems/commit/50a7e34586
2021-11-05Skip TestIRB::TestInit#test_recovery_sigint on SolarisYusuke Endoh
The test randomly gets stuck on Solaris: http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20211105T060014Z.fail.html.gz ``` 1) Error: TestIRB::TestInit#test_recovery_sigint: Timeout::Error: execution of assert_in_out_err expired timeout (100.0 sec) pid 3195 killed by SIGTERM (signal 15) | Switch to inspect mode. | exit | ``` I investigated the issue but I couldn't figure it out. This random failure is noisy, which makes it difficult to track the CI. So I skip the test on Soalris. Contribution is welcome.
2021-11-05Add the test of `Dir.glob` when `sort: true` is given explicitlyNobuyoshi Nakada
2021-11-05[rubygems/rubygems] Don't apply `--destdir` twice when running `setup.rb`Alyssa Ross
Prior to this patch, if I ran: ruby setup.rb --destdir /foo Then Bundler files would be written into /foo/foo, because destdir was being prepended, even though `bundler_spec.bin_dir` already included destdir. https://github.com/rubygems/rubygems/commit/9e857ffb52
2021-11-04test/ruby/test_gc_compact.rb: Backpatch the URL to the PRYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/5077
2021-11-04test/ruby/test_gc_compact.rb: Do not run on s390xYusuke Endoh
The compaction tests get stuck randomly on s390x for unknown reason. http://rubyci.s3.amazonaws.com/s390x/ruby-master/log/20211104T030003Z.fail.html.gz ``` [13715/21145] TestGCCompact#test_gc_compact_statstimeout: output interval exceeds 1800.0 seconds. ``` We spent some time to investigate this issue, but we can't figure out why, and it is unlikely that we'll be able to fix it anytime soon. This random failure makes the CI unuseful, so tentatively we suppress this test for a while. A contribution from those who are familiar with s390x is welcome. Notes: Merged: https://github.com/ruby/ruby/pull/5077
2021-11-04[rubygems/rubygems] Fix typosNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/f328ef6f77
2021-11-04[ruby/net-http] Reset keep_alive timer on new connectionKazuki Yamaguchi
The last_communicated timestamp is for HTTP persistent connection, to decide whether the current TCP connection may be reused for the subsequent requests or not. Naturally, the timer must be reset if the connection is recreated since it is no longer relevant. https://github.com/ruby/net-http/commit/0a013de42d
2021-11-04[ruby/rdoc] Fix typos in test method names [ci skip]Nobuyoshi Nakada
https://github.com/ruby/rdoc/commit/8386333323
2021-11-03[ruby/openssl] Fix typos [ci skip]Nobuyoshi Nakada
https://github.com/ruby/openssl/commit/708ebf2f7a
2021-11-03[ruby/optparse] Fix typo [ci skip]Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/0aa18752cf
2021-11-03[rubygems/rubygems] Fix `gem install` vs `gem fetch` inconsistencyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b3e985799e
2021-11-02Fix typosNobuyoshi Nakada
2021-11-02[rubygems/rubygems] Use OpenSSL constants for error codes.Vít Ondruch
This fixes the following test error testing against OpenSSL 3.x: ~~~ 2) Failure: TestGemRequest#test_verify_certificate_extra_message [/builddir/build/BUILD/ruby-3.0.2/test/rubygems/test_gem_request.rb:358]: <"ERROR: SSL verification error at depth 0: invalid CA certificate (24)\n" + "ERROR: Certificate is an invalid CA certificate\n"> expected but was <"ERROR: SSL verification error at depth 0: invalid CA certificate (79)\n" + "ERROR: Certificate is an invalid CA certificate\n">. ~~~ Where the root cause is this OpenSSL commit: https://github.com/openssl/openssl/commit/1e41dadfa7b9f792ed0f4714a3d3d36f070cf30e It seems that OpenSSL upstream considers the constant value just an implementation detail and therefore this changes the test case to follow the suite. https://github.com/rubygems/rubygems/commit/8acf8e95dc
2021-11-02test/readline/test_readline.rb: Use TERM=vt100 to run the testsYusuke Endoh
Readline seems to emit an escape sequence `"\e[?1034h` at an unpredictable timing when `TERM=xterm` or something. This leads to a noisy random test failure. http://rubyci.s3.amazonaws.com/amazon2/ruby-master/log/20211102T063005Z.fail.html.gz ``` 1) Failure: TestReadline#test_modify_text_in_pre_input_hook [/home/chkbuild/chkbuild/tmp/build/20211102T063005Z/ruby/test/readline/test_readline.rb:404]: <"> hello world\n"> expected but was <"\e[?1034h> hello world\n">. ``` This test is for Ruby's readline extension, not for readline library itself. So here this change force to use "TERM=vt100" to run the tests.
2021-11-02Allow custom LicenseRefCarlos Palhares
2021-11-02Remove SimpleCov at all.Josef Šimánek
2021-11-02Removed the related code of `gem server`Hiroshi SHIBATA
2021-11-01[ruby/openssl] ssl: disallow reading/writing to unstarted SSL socketKazuki Yamaguchi
OpenSSL::SSL::SSLSocket allowed #read and #write to be called before an SSL/TLS handshake is completed. They passed unencrypted data to the underlying socket. This behavior is very odd to have in this library. A verbose mode warning "SSL session is not started yet" was emitted whenever this happened. It also didn't behave well with OpenSSL::Buffering. Let's just get rid of it. Fixes: https://github.com/ruby/openssl/issues/9 https://github.com/ruby/openssl/commit/bf780748b3
2021-10-31Argument forwarding definition without parentheses [Bug #18267]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5065
2021-10-30Apply the timeout scale to also separated workersNobuyoshi Nakada
2021-10-29Preserve the encoding of message from outer local variableNobuyoshi Nakada
In the case of read-only but refering an unshareable object.
2021-10-29Preserve the encoding of message from outer local variablesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5053
2021-10-29Remove redundant callsNobuyoshi Nakada
The ArgumentError should raise in `isolate`. Notes: Merged: https://github.com/ruby/ruby/pull/5053
2021-10-29Fix script_lines in loaded iseq as nilNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5047
2021-10-28Rename ::YJIT to RubyVM::YJITAlan Wu
Since the YJIT Ruby module is CRuby specific and not meant for general use, it should live under RubyVM instead of at top level. Notes: Merged: https://github.com/ruby/ruby/pull/5038
2021-10-28Fix leap day with UTC offset [Bug #18274]Nobuyoshi Nakada
`struct vtm::year` is a Ruby integer instance, but not a C integer type. Notes: Merged: https://github.com/ruby/ruby/pull/5041
2021-10-27YJIT: move --yjit-stats at_exit call into RubyAlan Wu
This change fixes `-v --yjit-stats`. Previously in this situation, YJIT._print_stats wasn't defined as yjit.rb is not evaluated when there is only "-v" and no Ruby code to run. Notes: Merged: https://github.com/ruby/ruby/pull/5022
2021-10-27Expect multi-line -v output for -DRUBY_DEVEL in testsAlan Wu
On -DRUBY_DEVEL builds, `ruby -v` can print extra info about the last commit on a separate line, breaking some tests that expect a single line. Assert only the first line instead. Notes: Merged: https://github.com/ruby/ruby/pull/5022
2021-10-27Fix indentation in testAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/5022
2021-10-27YJIT: Support newhash with values (#5029)John Hawthorn
* YJIT: Implement newhash with values * YJIT: Add test of duphash * Fix compilation on macos/clang Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2021-10-27[ruby/error_highlight] Make the formatter mechanism support RactorYusuke Endoh
Now the formatter configuration is per Ractor. DefaultFormatter is used if not set. DefaultFormatter#message_for is now a class method to allow sub-Ractors to call the method. https://github.com/ruby/error_highlight/commit/9fbaa8ab7c
2021-10-26pack.c: add an offset argument to unpack and unpack1Jean Boussier
[Feature #18254] This is useful to avoid repeteadly copying strings when parsing binary formats
2021-10-26Add Class#descendantsJeremy Evans
Doesn't include receiver or singleton classes. Implements [Feature #14394] Co-authored-by: fatkodima <fatkodima123@gmail.com> Co-authored-by: Benoit Daloze <eregontp@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4974 Merged-By: jeremyevans <code@jeremyevans.net>
2021-10-26[Bug #18264] Fix memory leak in TracePointPeter Zhu
TracePoint leaks memory because it allocates a `rb_tp_t` struct without ever freeing it (it is created with `RUBY_TYPED_NEVER_FREE`). Notes: Merged: https://github.com/ruby/ruby/pull/5008
2021-10-26Make the metaclass of Refinement explicitlyShugo Maeda
Otherwise, singleton methods of Module are not inherited unless Refinement.singleton_class is called.
2021-10-26fix random EBADF problemKoichi Sasada
```ruby r, w = IO.pipe r.close IO.for_fd(w.fileno).close ``` This code closes a file descriptor `w.fileno`, but `w` doesn't know the closing. Another code can open same file descriptor with opening file (`f`). After that, the `w` will GCed and `w.fileno` is closed again, and `f.fileno` is closed too, so IO operations for `f` (`f.close`) will cause EBADF. To fix this issue, do this test in another process.
2021-10-26[rubygems/rubygems] Add support to build and sign certificates with multiple ↵Jenny Shen
key algorithms https://github.com/rubygems/rubygems/commit/967876f15d Co-Authored-By: Frederik Dudzik <frederik.dudzik@shopify.com>
2021-10-25[Feature #18239] Implement VWA for stringsPeter Zhu
This commit adds support for embedded strings with variable capacity and uses Variable Width Allocation to allocate strings. Notes: Merged: https://github.com/ruby/ruby/pull/4933
2021-10-25Strip out YJIT at build time when unsupported or disabled (#5003)Alan Wu
In an effort to minimize build issues on non x64 platforms, we can decide at build time to not build the bulk of YJIT. This should fix obscure build errors like this one on riscv64: yjit_asm.c:137:(.text+0x3fa): relocation truncated to fit: R_RISCV_PCREL_HI20 against `alloc_exec_mem' We also don't need to bulid YJIT on `--disable-jit-support` builds. One wrinkle to this is that the YJIT Ruby module will not be defined when YJIT is stripped from the build. I think that's a fair change as it's only meant to be used for YJIT development. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2021-10-25test/ruby/test_jit.rb: Add a test for checkmatch insnYusuke Endoh