summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-09-22[rubygems/rubygems] Fix bug where redacted credentials are sent to serverJonathan
Implement deep cloning for `Gem::Uri` class to fix a bug where redacting credentials modifies the URI string in place instead of returning a modified copy. https://github.com/rubygems/rubygems/commit/eafb5a279b
2021-09-22[rubygems/rubygems] Update gem request tests to pass a Gem::Uri into the ↵Jonathan
Gem::Request class https://github.com/rubygems/rubygems/commit/e8e7c2078f
2021-09-22[rubygems/rubygems] Only check if descriptions *start with* FIXME/TODOEllen Marie Dash
It doesn't make much sense to just forbid certain words in descriptions. https://github.com/rubygems/rubygems/commit/7890c98415
2021-09-21[ruby/irb] Fix argument orderNobuyoshi Nakada
https://github.com/ruby/irb/commit/05c65858a0
2021-09-20Add alternative optional hook for `scheduler_close` to allow public usage of ↵Samuel Williams
close. Notes: Merged: https://github.com/ruby/ruby/pull/4658
2021-09-20Allow to include uninitialized modules [Bug #18177]Nobuyoshi Nakada
The module that is about to be included is considered initialized. Notes: Merged: https://github.com/ruby/ruby/pull/4868
2021-09-20MINGW-UCRT: Set CONFIG['arch'] and RUBY_PLATFORM to "x64-mingw-ucrt"Lars Kanis
This allows easy differentiation between ABI incompatible platforms like MSWIN64 and MSVCRT-based MINGW32. This also implicates a distinct rubygem platform which is also "x64-mingw-ucrt". Although the term "mingw32" is the OS-part for 64 bit systems as well, the "32" is misleading and confusing for many users. Therefore the new platform string drops the "32" from the OS part to just "mingw". This conforms to the common practice of windows platform testing per RUBY_PLATFORM=~/mswin|mingw/ . Notes: Merged: https://github.com/ruby/ruby/pull/4599
2021-09-20Adjust test to set+get big values on all platforms and add MINGW-UCRTLars Kanis
Previously the test verified on MSWIN that huge values can not be stored in environment variables but that they can on others. IMHO the intention of the test should not change between platforms. Therefore this adjusts the test to have the same intention - that is to store a big value. This also fixes compatibility with MINGW-UCRT, which previously failed with: <Errno::EINVAL: Invalid argument - ruby_setenv(foo)> test/ruby/test_env.rb:512:in `[]=' test/ruby/test_env.rb:512:in `block in test_huge_value' Notes: Merged: https://github.com/ruby/ruby/pull/4599
2021-09-18Revert "Do not load file with same realpath twice when requiring"Jeremy Evans
This reverts commit ddb85c5d2bdf75a83eb163856508691a7436b446. This commit causes unexpected warnings in TestTranscode#test_loading_race occasionally in CI.
2021-09-18Do not load file with same realpath twice when requiringJeremy Evans
This fixes issues with paths being loaded twice in certain cases when symlinks are used. It took me multiple attempts to get this working. My original attempt tried to convert paths to realpaths before adding them to $LOADED_FEATURES. Unfortunately, this doesn't work well with the loaded feature index, which is based off load paths and not realpaths. While I was able to get require working, I'm fairly sure the loaded feature index was not being used as expected, which would have significant performance implications. Additionally, I was never able to get that approach working with autoload when autoloading a non-realpath file. It also broke some specs. This takes a more conservative approach. Directly before loading the file, if the file with the same realpath has been required, the loading of the file is skipped. The realpaths are stored as fstrings in a hidden hash. When rebuilding the loaded feature index, the hash of realpaths is also rebuilt. I'm guessing this makes rebuilding process slower, but I don think that is a hot path. In general, modifying loaded features is only done when reloading, and that tends to be in non-production environments. Change test_require_with_loaded_features_pop test to use 30 threads and 300 iterations, instead of 4 threads and 1000 iterations. I saw only sporadic failures with 4/1000, but consistent failures 30/300 threads. These failures were due to the fact that the concurrent deletions from $LOADED_FEATURES in other threads can result in rb_ary_entry returning nil when rebuilding the loaded features index. To avoid concurrency issues when rebuilding the loaded features index, the building of the index itself is left alone, and afterwards, a separate loop is done on a copy of the loaded feature snapshot in order to rebuild the realpaths hash. Fixes [Bug #17885] Notes: Merged: https://github.com/ruby/ruby/pull/4615
2021-09-18ast.c: AST.of against C method should return nil (as Ruby 2.6--3.0)Yusuke Endoh
2021-09-18ast.c: AST.of checks if a given method object is defined in CYusuke Endoh
[Bug #18178]
2021-09-17Removed Module.allocate [Bug #17048]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4858
2021-09-17Already initialized modules cannot be replaced [Bug #17048]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4858
2021-09-17[Feature #18172] Fix duplicate test nameNobuyoshi Nakada
2021-09-16[Feature #18172] Add MatchData#match_lengthNobuyoshi Nakada
The method to return the length of the matched substring corresponding to the given argument. Notes: Merged: https://github.com/ruby/ruby/pull/4851
2021-09-16[Feature #18172] Add MatchData#matchNobuyoshi Nakada
The method to return the single matched substring corresponding to the given argument. Notes: Merged: https://github.com/ruby/ruby/pull/4851
2021-09-16[Bug #18173] Update loaded_features_indexNobuyoshi Nakada
If $LOADED_FEATURES is changed in the just required file, also the index table needs to be updated before loaded_features_snapshot is reset. If the snapshot is reset without updating the table, the name of the added feature will not be found. Notes: Merged: https://github.com/ruby/ruby/pull/4849
2021-09-15[ruby/racc] Prefer __dir__ over File.dirname(__FILE__)Olle Jonsson
https://github.com/ruby/racc/commit/c49df40658
2021-09-15Add test cases for constants and keywordsShugo Maeda
2021-09-15[ruby/racc] Rename helper to caseHiroshi SHIBATA
2021-09-15[ruby/racc] Ignored loading CoreAssertions in test caseHiroshi SHIBATA
https://github.com/ruby/racc/commit/1f8b05b298
2021-09-15[ruby/logger] Ignored loading CoreAssertions in test runnerHiroshi SHIBATA
https://github.com/ruby/logger/commit/2fd5401ad6
2021-09-15Marshal.load: do not call the proc until strings have their encodingJean Boussier
Ref: https://bugs.ruby-lang.org/issues/18141 Notes: Merged: https://github.com/ruby/ruby/pull/4797
2021-09-14Handle overwriting Object::ENV in spawnJeremy Evans
Instead of looking for Object::ENV (which can be overwritten), directly look for the envtbl variable. As that is static in hash.c, and the lookup code is in process.c, add a couple non-static functions that will return envtbl (or envtbl#to_hash). Fixes [Bug #18164] Notes: Merged: https://github.com/ruby/ruby/pull/4834
2021-09-14[ruby/reline] The behaviour of Alt+key on Windows is changedaycabta
ref. https://github.com/ruby/reline/commit/dc2cf90fa6 https://github.com/ruby/reline/commit/4d1518aafc
2021-09-13Use capture_output instead of capture_ioHiroshi SHIBATA
2021-09-13Adds mixed hash value and value omission testsBrandon Weaver
Introduces specification tests for mixed values and value omissions for Hashes and keyword arguments, such as `{ a:, b:, c: 3 }`. Notes: Merged: https://github.com/ruby/ruby/pull/4829
2021-09-13Fixed leaked file descriptorHiroshi SHIBATA
Leaked file descriptor: TestRDocGeneratorDarkfish#test_template_stylesheets: 11 : #<File:./tmp20210913-30865-7c4ey8/hoge20210913-30865-evm2uo.css>
2021-09-12Preserve the encoding of the argument in IndexError [Bug #18160]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4822
2021-09-11Hash values should be omitted in Ripper resultsShugo Maeda
2021-09-11Add documentation and tests for keyword argument value omissionShugo Maeda
[Feature #14579]
2021-09-11Another test for [Feature #14579]Nobuyoshi Nakada
The value of the dynamic key cannot be omitted for now.
2021-09-11Allow value omission in Hash literalsShugo Maeda
`{x:, y:}` is a syntax sugar of `{x: x, y: y}`.
2021-09-11[ruby/rdoc] Convert upper case copyright and registered marksNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/3bca7dc093
2021-09-11[ruby/rdoc] Convert tick double quote in character entity referencesNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/6ed889aac9
2021-09-11[ruby/rdoc] Convert a backtick to an open single quoteNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/82eaefbae4
2021-09-11[ruby/rdoc] Convert single quotes in character entity referencesNobuyoshi Nakada
As well as double quotes. https://github.com/ruby/rdoc/pull/824#discussion_r683173389 https://github.com/ruby/rdoc/commit/09002bdab5
2021-09-11[ruby/net-http] Use omit instead of skip for test-unitHiroshi SHIBATA
https://github.com/ruby/net-http/commit/5bb14fd3bc
2021-09-11Fixed inconsistent require order for assertions and core_assertionsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Use Test::Unit::Runner instead of MiniTest::UnitHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Use CoreAssertions instead of AssertionsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11Use MiniTestHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4813
2021-09-11[ruby/irb] Ignore invalid 3 colons in completionaycabta
https://github.com/ruby/irb/commit/5e29e3e39c
2021-09-10[ruby/reline] Move #pointer from DialogRenderInfo to Dialogaycabta
https://github.com/ruby/reline/commit/92dbac0bff
2021-09-10[ruby/reline] Fix scroll range of a script for testsaycabta
https://github.com/ruby/reline/commit/6ceebe52bc
2021-09-10[ruby/reline] Add tests that column of dialog with scrollbar is moved ↵aycabta
without garbase https://github.com/ruby/reline/commit/45c70d6222
2021-09-10[ruby/reline] Add a test that text under dialog appearsaycabta
https://github.com/ruby/reline/commit/0b63bd56ce
2021-09-10[ruby/reline] Add a test that autocomplete doesn't crash after 2nd lineaycabta
https://github.com/ruby/reline/commit/f682c74975
2021-09-10[ruby/reline] Add a test that dialog doesn't crash when callback returns nilaycabta
https://github.com/ruby/reline/commit/2c6f604b98