aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Chect what remains in TMPDIR"Yusuke Endoh2022-08-291-12/+7
| | | | | | | | This reverts commit 7bdb999d0f28c7bb9d7a35ca775e405674527e5f. I think I confirmed the mechanism. GCC (invoked by MJIT) creates a temporary file in TMPDIR, which prevents rm_rf from removing the directory.
* Chect what remains in TMPDIRYusuke Endoh2022-08-291-7/+12
| | | | | I guess it has a shared library file created by MJIT, but I want to make sure the fact.
* [Bug #18963] Separate string contents by here document terminatorNobuyoshi Nakada2022-08-281-0/+10
|
* Pass wait: false to avoid a timeoutTakashi Kokubun2022-08-271-1/+1
|
* Try to prevent the failure of FileUtils.rm_rfTakashi Kokubun2022-08-271-5/+7
|
* Ignore rm -rf failureTakashi Kokubun2022-08-271-1/+1
| | | | | | | | | | | http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker/4213386 It's failing with: rm: cannot remove '/tmp/ruby/v3/build/trunk-mjit/tmp/test_rubygems_20220827-13666-ii8lcp': Directory not empty rm: cannot remove '/tmp/ruby/v3/build/trunk-mjit/tmp/test_rubygems_20220827-13666-fy77y1': Directory not empty I'd like to make sure the following `ENV.replace` is called and see if there's any other issues.
* Try rm -rf instead of FileUtils.rm_rfTakashi Kokubun2022-08-261-1/+6
| | | | | FileUtils.rm_rf started to randomly fail on http://ci.rvm.jp/results/trunk-mjit@phosphorus-docker since around https://github.com/ruby/fileutils/pull/99.
* Convert catch_except_t to stdboolTakashi Kokubun2022-08-251-3/+3
| | | | | | | catch_excep_t is a field that exists for MJIT. In the process of rewriting MJIT in Ruby, I added API to convert 1/0 of _Bool to true/false, and it seemed confusing and hard to maintain if you don't use _Bool for *_p fields.
* Raise ArgumentError for IO.foreach with limit of 0Jeremy Evans2022-08-251-0/+2
| | | | | | Makes behavior consistent with IO.readlines. Fixes [Bug #18767]
* Skip running a DRb test on MinGWTakashi Kokubun2022-08-253-1/+6
| | | | | | | | | | It hangs even after a retry https://github.com/ruby/ruby/runs/7966439530?check_suite_focus=true We contacted GitHub Suppport about this before, and we concluded that the problem is on our end. Unfortunately we don't have a bandwidth to fix this MinGW problem, so until we get to work on it, this should be just skipped to avoid a sporadic CI timeout.
* Make sure super is called and fix teardownTakashi Kokubun2022-08-252-0/+3
|
* Skip flaky mkmf tests on AppVeyorTakashi Kokubun2022-08-251-0/+6
| | | | | | | | | | | | | | It seems like TestMkmfTryConstant started to randomly fail, maybe related to 96562a517d3373466ec306b5f821a41f4758d2a6 or 073f3b7e0ad94657c04573983affb9d66e6bff2c. Some of them seem to have failed even after retries, so it feels like there's a bug in the implementation, which leaves an unrecoverable situation. https://ci.appveyor.com/project/ruby/ruby/builds/44559958/job/7uub5bmkvy4pwwl8 https://ci.appveyor.com/project/ruby/ruby/builds/44579924/job/n81xmb2mqs6no7dm https://ci.appveyor.com/project/ruby/ruby/builds/44558471/job/s4qwymmlxmfjjd35 Until we figure out what it is, I'd like to stabilize the CI by not running it.
* test/-ext-/eval/test_eval.rb: Prevent "assigned but unused variable"Yusuke Endoh2022-08-241-2/+2
|
* [ruby/fileutils] FileUtils.rm* methods swallows only Errno::ENOENT when ↵Yusuke Endoh2022-08-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | force is true ... instead of any StandardError. To behave like the standard `rm` command, it should only ignore exceptions about not existing files, not every exception. This should make debugging some errors easier, because the expectation is that `rm -rf` will succeed if and only if, all given files (previously existent or not) are removed. However, due to this exception swallowing, this is not always the case. From the `rm` man page > COMPATIBILITY > > The rm utility differs from historical implementations in that the -f > option only masks attempts to remove non-existent files instead of > masking a large variety of errors. https://github.com/ruby/fileutils/commit/fa65d676ec Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net>
* [ruby/fileutils] Narrow the scope of ensureYusuke Endoh2022-08-231-0/+18
| | | | | | | | | | | | | | | | | | | | | | | The ensure in postorder_traverse was added for [Bug #6756]. The intention was to try to delete the parent directory if it failed to get the children. (It may be possible to delete the directory if it is empty.) However, the ensure region rescue'ed not only "failure to get children" but also "failure to delete each child". Thus, the following raised Errno::ENOTEMPTY, but we expect it to raise Errno::EACCES. ``` $ mkdir foo $ touch foo/bar $ chmod 555 foo $ ruby -rfileutils -e 'FileUtils.rm_rf("foo")' ``` This changeset narrows the ensure region so that it rescues only "failure to get children". https://github.com/ruby/fileutils/commit/ec5d3b84ea
* [ruby/fileutils] Fix the test permission of "test_rm_rf"Yusuke Endoh2022-08-231-1/+1
| | | | | | | | | The test was added for [Bug #6756]. The ticket insisted `FileUtils.rm_rf` should delete an empty directory even if its permission is 000. However, the test tried to delete a directory with permission 700. https://github.com/ruby/fileutils/commit/d6c2ab2c01
* omit all assertions at TestIO_Console#test_intr when running with FreeBSDHiroshi SHIBATA2022-08-231-9/+11
|
* [rubygems/rubygems] Implement extra rules for libc versioningDavid Rodríguez2022-08-231-3/+11
| | | | https://github.com/rubygems/rubygems/commit/7e976d790a
* [rubygems/rubygems] Fix `gem install` still choosing musl incorrectlyDavid Rodríguez2022-08-231-0/+35
| | | | https://github.com/rubygems/rubygems/commit/1b9f7f50a5
* [rubygems/rubygems] Remove unnecessary variablesDavid Rodríguez2022-08-231-3/+2
| | | | https://github.com/rubygems/rubygems/commit/b5e0c683d9
* [rubygems/rubygems] Handle non-gnu libc on linux platforms in RubyGemsDavid Rodríguez2022-08-231-0/+30
| | | | | | | | | | | | | | | Attempting to install a gem published as both *-linux and *-linux-musl results in the incorrect gem being picked up, causing build failures due to binary incompatibility. This is caused by the `nil` wildcard swallowing the libc information upon version comparison. Handle the linux case by performing only non-wildcard equality on the version and asserting 'gnu' and nil equivalence, while preserving the current behaviour for other OSes. https://github.com/rubygems/rubygems/commit/9eead86abc Co-authored-by: Loic Nageleisen <loic.nageleisen@gmail.com>
* [rubygems/rubygems] Test platform parsing stabilityLoic Nageleisen2022-08-231-0/+1
| | | | | | | | | | On past versions there were observed cases of inconsistencies when some platforms were re-parsed. Ensure that a platform's string representation parses again in a platform object equal to the original. https://github.com/rubygems/rubygems/commit/6da35ee93c
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2022-08-232-5/+5
| | | | | | | | | | | | | | | | | Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.29 to 0.9.30. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.29...v0.9.30) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> https://github.com/rubygems/rubygems/commit/912da7828e
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2022-08-232-5/+5
| | | | | | | | | | | | | | | | | | | /test/rubygems/test_gem_ext_cargo_builder/custom_name Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.29 to 0.9.30. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.29...v0.9.30) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> https://github.com/rubygems/rubygems/commit/d54c936c4c
* [Bug #18937] Coerce non-Numeric into Complex at comparisonsNobuyoshi Nakada2022-08-221-1/+1
|
* [ruby/fileutils] Fix mkdir_p hanging on Windows when trying to create a file ↵David Rodríguez2022-08-221-0/+8
| | | | | | on a offline drive https://github.com/ruby/fileutils/commit/9cc6a082d7
* Add invalid hexadecimal float testsNobuyoshi Nakada2022-08-211-0/+3
|
* Drop mswin support of MJIT (#6265)Takashi Kokubun2022-08-201-2/+1
| | | | | | | The current MJIT relies on SIGCHLD and fork(2) to be performant, and it's something mswin can't offer. You could run Linux MJIT on WSL instead. [Misc #18968]
* Consider resolved-through-zsuper methods equal for compatibilityBenoit Daloze2022-08-201-0/+18
| | | | * Fixes https://bugs.ruby-lang.org/issues/18751
* Make Object#method and Module#instance_method not skip ZSUPER methodsJeremy Evans2022-08-201-5/+54
| | | | | | | | | | | | | | | | | | | | | | | 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>
* [Bug #18964] Add test for `rb_econv_append`Nobuyoshi Nakada2022-08-201-0/+23
|
* Rename mjit_exec to jit_exec (#6262)Takashi Kokubun2022-08-191-1/+1
| | | | | | | * Rename mjit_exec to jit_exec * Rename mjit_exec_slowpath to mjit_check_iseq * Remove mjit_exec references from comments
* Support Encoding::Converter newline: :lf and :lf_newline optionsJeremy Evans2022-08-192-0/+44
| | | | | | | | | | | | | | | | Previously, newline: :lf was accepted but ignored. Where it should have been used was commented out code that didn't work, but unlike all other invalid values, using newline: :lf did not raise an error. This adds support for newline: :lf and :lf_newline, for consistency with newline: :cr and :cr_newline. This is basically the same as universal_newline, except that it only affects writing and not reading due to RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK. Add tests for the File.open :newline option while here. Fixes [Bug #12436]
* [Bug #18958] format string must be ASCII compatibleNobuyoshi Nakada2022-08-201-0/+10
|
* [Bug #18956] Negative codepoints are invalid charactersNobuyoshi Nakada2022-08-201-0/+1
|
* [Bug #18955] format single character for `%c`Nobuyoshi Nakada2022-08-202-2/+3
|
* [Bug #18955] Check length of argument for `%c` in proper encodingNobuyoshi Nakada2022-08-201-0/+2
|
* Harden SizedQueue#push timeout testNobuyoshi Nakada2022-08-191-3/+3
|
* rb_str_resize: Only clear coderange on truncationJean Boussier2022-08-181-0/+10
| | | | | If we are expanding the string or only stripping extra capacity then coderange won't change, so clearing it is wasteful.
* Implement SizedQueue#push(timeout: sec)Jean Boussier2022-08-181-0/+18
| | | | | | | [Feature #18944] If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised.
* Fix flaky test for GC thrashingPeter Zhu2022-08-171-0/+4
| | | | | GC could be in an intermediate state after creating the objects, so we should finish GC by running a minor GC.
* [ruby/cgi] Implement `CGI.url_encode` and `CGI.url_decode`Jean Boussier2022-08-161-1/+48
| | | | | | | | [Feature #18822] Ruby is somewhat missing an RFC 3986 compliant escape method. https://github.com/ruby/cgi/commit/c2729c7f33
* Update the excluding message for Psych [ci skip]Nobuyoshi Nakada2022-08-161-1/+4
|
* Optimize Marshal dump/load for large (> 31-bit) FIXNUM (#6229)John Hawthorn2022-08-151-1/+21
| | | | | | | | | | | | | | | | | | | | | | | * Optimize Marshal dump of large fixnum Marshal's FIXNUM type only supports 31-bit fixnums, so on 64-bit platforms the 63-bit fixnums need to be represented in Marshal's BIGNUM. Previously this was done by converting to a bugnum and serializing the bignum object. This commit avoids allocating the intermediate bignum object, instead outputting the T_FIXNUM directly to a Marshal bignum. This maintains the same representation as the previous implementation, including not using LINKs for these large fixnums (an artifact of the previous implementation always allocating a new BIGNUM). This commit also avoids unnecessary st_lookups on immediate values, which we know will not be in that table. * Fastpath for loading FIXNUM from Marshal bignum * Run update-deps
* Add test for GC thrashing of young object creationPeter Zhu2022-08-151-0/+22
| | | | This test will prevent performance regressions like [Bug #18929].
* [ruby/rinda] Handle situations where IPv4 multicast is not availableJeremy Evans2022-08-151-30/+41
| | | | | | Fixes [Bug #13864] https://github.com/ruby/rinda/commit/3cd620f38c
* [Bug #18962] Do not read again once reached EOFNobuyoshi Nakada2022-08-121-0/+14
| | | | | | | `Ripper::Lexer#parse` re-parses the source code with syntax errors when `raise_errors: false`. Co-Authored-By: tompng <tomoyapenguin@gmail.com>
* Remove Numeric#ceildivKouhei Yanagita2022-08-122-15/+0
|
* Add Numeric#ceildiv and Integer#ceildivKouhei Yanagita2022-08-123-0/+32
|
* Stop defining `RUBY_ABI_VERSION` if released versionsNobuyoshi Nakada2022-08-121-0/+2
| | | | | | As commented in include/ruby/internal/abi.h, since teeny versions of Ruby should guarantee ABI compatibility, `RUBY_ABI_VERSION` has no role in released versions of Ruby.