summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-03-29Add more tests for defined? with method callsJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/4213
2021-03-29[ruby/optparse] Fixed error message of unparsed non-optionNobuyoshi Nakada
Close https://github.com/ruby/optparse/issues/3 https://github.com/ruby/optparse/commit/94c5cf4032
2021-03-29[ruby/optparse] Add OptionParser#require_exact accessorJeremy Evans
This allows you to disable allowing abbreviations of long options and using short options for long options. Implements Ruby Feature #11523 https://github.com/ruby/optparse/commit/dfefb2d2e2
2021-03-29[ruby/irb] Always add input method when calling Irb.new in testsaycabta
When passes input method as nil to Context.new through Irb.new, ReidlineInputMethod.new is executed and the global internal state of Reline is rewritten, therefore other tests are failed in the Ruby repository. This commit changes to use TestInputMethod. https://github.com/ruby/irb/commit/010dce9210
2021-03-28[ruby/pathname] Fix segfault of Pathname#splitKenichi Kamiya
Fix segmentation fault of Pathname#split when File.split returns non array value [Bug #17755] https://github.com/ruby/pathname/commit/e29b49e3b1 https://github.com/ruby/pathname/commit/1db7479a74
2021-03-28[ruby/pathname] Support Ruby 3.0Hiroshi SHIBATA
Update test/pathname/test_pathname.rb https://github.com/ruby/pathname/commit/29645187e0 https://github.com/ruby/pathname/commit/78584864de Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-03-28Keep non evaluated keys in `Hash#transform_keys!` [Bug #17735]Kenichi Kamiya
Notes: Merged: https://github.com/ruby/ruby/pull/4294 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-28Fix segmentation fault when `Module#name` returns non string value [Bug #17754]Kenichi Kamiya
* Add test for NoMethodError#to_s does not segfault * Ensure no segfault even if Module#name is overridden Notes: Merged: https://github.com/ruby/ruby/pull/4328 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-27Fix Enumerable#tally with some arguments pattern [Feature #17744]Kenichi Kamiya
* Add test cases for Enumerable#tally with hash argument * Add ruby/spec for Enumerable#tally with hash argument * Fix Enumerable#tally does not update given frozen hash * Add test cases for Enumerable#tally with hash convertible arguments * Fix SEGV when Enumerable#tally takes non Hash convertible * FIx cosmetic damage enum.c Notes: Merged: https://github.com/ruby/ruby/pull/4327 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-27No codesign in testsNobuyoshi Nakada
2021-03-26Enumerable#tally with the resulting hash [Feature #17744]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4318 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-25[ruby/irb] Cache completion files to requireaycabta
https://github.com/ruby/irb/commit/612ebcb311
2021-03-24Change heap walking to be safe for object allocationPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/4263
2021-03-24Ensure that caller respects the start argumentJeremy Evans
Previously, if there were ignored frames (iseq without pc), we could go beyond the requested start frame. This has two changes: 1) Ensure that we don't look beyond the start frame by using last_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(last_cfp) until the desired start frame is reached. 2) To fix the failures caused by change 1), which occur when a limited number of frames is requested, scan the VM stack before allocating backtrace frames, looking for ignored frames. This is complicated if there are ignored frames before and after the start, in which case we need to scan until the start frame, and then scan backwards, decrementing the start value until we get to the point where start will result in the number of requested frames. This fixes a Rails test failure. Jean Boussier was able to to produce a failing test case outside of Rails. Co-authored-by: Jean Boussier <jean.boussier@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4237
2021-03-24[ruby/irb] fix completion test when out-of-place buildNobuyoshi Nakada
2021-03-24[ruby/reline] Suppress crashing when completer_{quote,word_break}_characters ↵aycabta
is empty https://github.com/ruby/reline/commit/c6f1164942
2021-03-24[ruby/reline] Support preposing and postposing for Reline.completion_procaycabta
https://github.com/ruby/reline/commit/1f469de90c
2021-03-24[ruby/reline] Reline.delete_text removes the current line in multilineaycabta
https://github.com/ruby/reline/commit/da90c094a1
2021-03-24[ruby/irb] Complete require and require_relativeaycabta
https://github.com/ruby/irb/commit/1c61178b4c
2021-03-24[ruby/irb] Change ripper_lex_without_warning to a class methodaycabta
https://github.com/ruby/irb/commit/d9f8abc17e
2021-03-24Fix leaked file descriptor in passwd testPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/4312
2021-03-23Ignore useless separators preceding a file encoding commentNobuyoshi Nakada
2021-03-23Assertion for colon-separated encoding pragmaNobuyoshi Nakada
2021-03-23Refined failure messages in TestFileExhaustive#test_testNobuyoshi Nakada
2021-03-23test/zlib/test_zlib.rb: stop a failure on armv7lYusuke Endoh
The platform defines a constant File::TMPFILE, but it seems unavailable (maybe depending on the file system?). http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20210322T171707Z.fail.html.gz This change adds some rescue cluases to the test, copied from test/ruby/test_file.rb.
2021-03-23test/ruby/test_fiber.rb: relax timeout on SolarisYusuke Endoh
... of test_many_fibers_with_threads because the test seems to take about 180 sec. on Solaris. This change extends the limit to 300 sec on Solaris. BTW, 180 sec. is too long for other normal environments, so this reverts Related to 6ab7d439f8d43234004e1760aa88a98c29129006 for them.
2021-03-23Suppress verbose messagesNobuyoshi Nakada
Get rid of warnings in the parallel test. ``` unknown command: "Switch to inspect mode." ```
2021-03-22rb_enc_interned_str: handle autoloaded encodingsJean Boussier
If called with an autoloaded encoding that was not yet initialized, `rb_enc_interned_str` would crash with a NULL pointer exception. See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841 Notes: Merged: https://github.com/ruby/ruby/pull/4290
2021-03-22Hash#transform_values! ensures receiver modifiable in block [Bug #17736]Kenichi Kamiya
Notes: Merged: https://github.com/ruby/ruby/pull/4302 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-21[ruby/irb] Deal with different screen sizesTakashi Kokubun
e.g. http://rubyci.s3.amazonaws.com/centos8/ruby-master/log/20210321T063003Z.fail.html.gz https://github.com/ruby/irb/commit/ddb3472ba2
2021-03-21Pattern matching pin operator against expression [Feature #17411]Kazuki Tsujimoto
This commit is based on the patch by @nobu.
2021-03-21[ruby/irb] Add whereami commandTakashi Kokubun
https://github.com/ruby/irb/commit/bc822e4aac
2021-03-21[ruby/irb] Implement ls commandTakashi Kokubun
https://github.com/ruby/irb/commit/19b6c20604
2021-03-21Ensure the receiver hash modifiable before updating [Bug #17736]Nobuyoshi Nakada
Close https://github.com/ruby/ruby/pull/4298 Notes: Merged: https://github.com/ruby/ruby/pull/4299
2021-03-21Add Hash#{update, merge!} test to ensure receiver modifiable in blockKenichi Kamiya
Notes: Merged: https://github.com/ruby/ruby/pull/4299
2021-03-20Some Hash destructive methods ensure the receiver modifiable [Bug #17736]Kenichi Kamiya
refs: * https://bugs.ruby-lang.org/issues/17736 * https://github.com/ruby/ruby/pull/4296 This commit aims to cover following methods * Hash#select! * Hash#filter! * Hash#keep_if * Hash#reject! * Hash#delete_if I think these are not all. --- * Ensure the receiver is modifiable or not * Assert the receiver is not modified Notes: Merged: https://github.com/ruby/ruby/pull/4297
2021-03-20[ruby/irb] Don't call Ruby 2.4+'s String#pretty_printTakashi Kokubun
https://github.com/ruby/irb/commit/89bcf107be
2021-03-20Ensure the receiver is modifiable before shrinking [Bug #17736]Nobuyoshi Nakada
* Ensure the receiver is modifiable before shinking [Bug #17736] * Assert the receivers are not modified Notes: Merged: https://github.com/ruby/ruby/pull/4296 Merged-By: nobu <nobu@ruby-lang.org>
2021-03-19Fix Enumerable#inject with high negative fixnums [Bug #17731]Marc-Andre Lafortune
Notes: Merged: https://github.com/ruby/ruby/pull/4288
2021-03-19Fix infinite loop at illegal sequence [Bug #17729]Nobuyoshi Nakada
As mblen returns -1 on failure, skip the first byte and try the succeeding bytes in that case. Close https://github.com/ruby/ruby/pull/4281 Notes: Merged: https://github.com/ruby/ruby/pull/4284
2021-03-18Avoid rehashing in Hash#replace/dup/initialize_copy [Bug #16996]Marc-Andre Lafortune
2021-03-18Avoid rehashing in Hash#select/reject [Bug #16996]Marc-Andre Lafortune
2021-03-18Try to fix errors in TestIRB::TestHistory tooKazuhiro NISHIYAMA
https://github.com/ruby/actions/runs/2137935523?check_suite_focus=true#step:9:562 ``` 1) Error: TestIRB::TestHistory#test_history_concurrent_use: Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `mkdir' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `fu_mkdir' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:231:in `block (2 levels) in mkdir_p' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `reverse_each' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `block in mkdir_p' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `each' /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `mkdir_p' /home/runner/work/actions/actions/ruby/lib/irb/init.rb:355:in `rc_file_generators' /home/runner/work/actions/actions/ruby/lib/irb/init.rb:330:in `rc_file' /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:170:in `block in assert_history' /home/runner/work/actions/actions/ruby/lib/tmpdir.rb:96:in `mktmpdir' /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:168:in `assert_history' /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:133:in `test_history_concurrent_use' ```
2021-03-18Fix errors when XDG_CONFIG_HOME points to non-writable directoryKazuhiro NISHIYAMA
`$HOME/.config` is not writable on CI because I think tests should not corrupt user's data. And GitHub Actions CI sets `XDG_CONFIG_HOME` since `Version: 20210309.1`. https://github.com/ruby/actions/runs/2130811016?check_suite_focus=true#step:16:301 ``` Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb ```
2021-03-16Skip refined method when exporting methods with changed visibilityJeremy Evans
Previously, attempting to change the visibility of a method in a singleton class for a class/module that is prepended to and refined would raise a NoMethodError. Fixes [Bug #17519] Notes: Merged: https://github.com/ruby/ruby/pull/4200
2021-03-17test_zlib(test_path_tmpfile): fix Zlib instance leakSorah Fukumori
follow-up: commit cf831f49189c4a890da6845e39199a5dfaf4fb48
2021-03-17zlib: fix Gzip{Writer,Reader}.new fails with a O_TMPFILE fileSorah Fukumori
2021-03-16test/openssl/test_config: skip tests for .include on older OpenSSLKazuki Yamaguchi
The .include directive was initially added by OpenSSL 1.1.1, but the syntax was later modified in 1.1.1b to improve compatibility with the parser in <= 1.1.0. The test case expects 1.1.1b's parser. https://github.com/openssl/openssl/commit/95f59d398c3f28f7ee50f092106c5910d25f9e30 The test case is failing on Ubuntu 18.04 because it still uses the initial 1.1.1 release: http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210316T120003Z.fail.html.gz
2021-03-16test/openssl/test_cipher: skip AES-CCM tests on OpenSSL <= 1.1.1bKazuki Yamaguchi
AES CCM mode in OpenSSL <= 1.1.1b was overly strict in the parameters assignment order. This has been relaxed by OpenSSL 1.1.1c. https://github.com/openssl/openssl/commit/b48e3be947ddc5da6b5a86db8341081c72b9a4ee The test case is failing on Ubuntu 18.04 because it still uses the initial 1.1.1 release and has the issue: http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210316T120003Z.fail.html.gz
2021-03-16test/ruby/test_regexp.rb: Avoid "ambiguity between regexp and two divisions"Yusuke Endoh