summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
13 hours[PRISM] Enable integer testKevin Newton
14 hours[PRISM] Use redundant return flagKevin Newton
14 hours[ruby/prism] Location#slice_lines, Node#slice_linesKevin Newton
https://github.com/ruby/prism/commit/9b61f6fdb3
15 hours[ruby/prism] Add a flag on returns when they are redundantKevin Newton
https://github.com/ruby/prism/commit/450541d2c3
16 hours[ruby/irb] Suppress command return valuesStan Lo
(https://github.com/ruby/irb/pull/934) Since commands can't be chained with methods, their return values are not intended to be used. But if IRB keeps storing command return values as the last value, and print them, users may rely on such implicit behaviour. So to avoid such confusion, this commit suppresses command's return values. It also updates some commands that currently rely on this implicit behaviour. https://github.com/ruby/irb/commit/fa96bea76f
17 hours[ruby/openssl] Only CSR version 1 (encoded as 0) is allowed by PKIX standardsJob Snijders
RFC 2986, section 4.1 only defines version 1 for CSRs. This version is encoded as a 0. Starting with OpenSSL 3.3, setting the CSR version to anything but 1 fails. Do not attempt to generate a CSR with invalid version (which now fails) and invalidate the CSR in test_sign_and_verify_rsa_sha1 by changing its subject rather than using an invalid version. This commit fixes the following error. ``` 2) Error: test_version(OpenSSL::TestX509Request): OpenSSL::X509::RequestError: X509_REQ_set_version: passed invalid argument /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `version=' /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `issue_csr' /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:43:in `test_version' 40: req = OpenSSL::X509::Request.new(req.to_der) 41: assert_equal(0, req.version) 42: => 43: req = issue_csr(1, @dn, @rsa1024, OpenSSL::Digest.new('SHA256')) 44: assert_equal(1, req.version) 45: req = OpenSSL::X509::Request.new(req.to_der) 46: assert_equal(1, req.version) ``` https://github.com/ruby/openssl/commit/c06fdeb091
17 hours[PRISM] Fix up if condition branch coverage locationKevin Newton
17 hours[PRISM] Fix up branch coverage for &. with blockKevin Newton
17 hours[PRISM] Enable branch coverage for if/unless conditionalsKevin Newton
17 hours[PRISM] Enable branch coverage for while/until loopsKevin Newton
17 hours[PRISM] Enable branch coverage for case pattern matchingKevin Newton
17 hours[PRISM] Enable branch coverage for caseKevin Newton
17 hours[PRISM] Enable branch coverage for &.Kevin Newton
17 hours[PRISM] Modify test_coverage to take prism into accountKevin Newton
21 hours[ruby/irb] Command registration should take both strings and symbolsStan Lo
as names (https://github.com/ruby/irb/pull/932) This will save users some heads scratching when they try to register a command with a string name and found that it doesn't work. I also rewrote converted custom command tests into integration tests to make test setup/cleanup easier. https://github.com/ruby/irb/commit/a91a212dbe
41 hours[ruby/reline] Fix inputrc nested $if $else $endif bugtomoya ishida
(https://github.com/ruby/reline/pull/689) https://github.com/ruby/reline/commit/0d8aea26ec
42 hoursDon't use assert_separately in Bug 20453 testDaniel Colson
https://github.com/ruby/ruby/pull/10630#discussion_r1579565056 The PR was merged before I had a chance to address this feedback. `assert_separately` is not necessary for this test if I don't use a global timeout.
43 hours[Bug #20453] segfault in Regexp timeoutDaniel Colson
https://bugs.ruby-lang.org/issues/20228 started freeing `stk_base` to avoid a memory leak. But `stk_base` is sometimes stack allocated (using `xalloca`), so the free only works if the regex stack has grown enough to hit `stack_double` (which uses `xmalloc` and `xrealloc`). To reproduce the problem on master and 3.3.1: ```ruby Regexp.timeout = 0.001 /^(a*)x$/ =~ "a" * 1000000 + "x"' ``` Some details about this potential fix: `stk_base == stk_alloc` on [init](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1153), so if `stk_base != stk_alloc` we can be sure we called [`stack_double`](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1210) and it's safe to free. It's also safe to free if we've [saved](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1187-L1189) the stack to `msa->stack_p`, since we do the `stk_base != stk_alloc` check before saving. This matches the check we do inside [`stack_double`](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1221)
45 hours[PRISM] Enable more passing testsKevin Newton
2 days[ruby/net-http] Skip test_session_reuse_but_expire with OpenSSL 3.3Xi Ruoyao
OpenSSL 3.3.0 9 Apr 2024 is also broken. Signed-off-by: Xi Ruoyao <xry111@xry111.site> https://github.com/ruby/net-http/commit/ab525c956d
3 days[ruby/prism] Warn for nested hashes as wellKevin Newton
https://github.com/ruby/prism/commit/76e802f59e
3 days[ruby/irb] Memoize helper method instances with Singleton moduleStan Lo
(https://github.com/ruby/irb/pull/931) Some helpers, like Rails console's `app`, requires memoization of the helper's ivars. To support it IRB needs to memoize helper method instances as well. https://github.com/ruby/irb/commit/a96c7a6668
3 days[ruby/reline] Long line performancetomoya ishida
(https://github.com/ruby/reline/pull/688) * Improve C-e (ed_move_to_end) performance for long line * Reline::Unicode.split_by_width optimization for RESET_SGR https://github.com/ruby/reline/commit/0c8d3c827a
3 days[ruby/irb] Revert "Memoize helper method instances with Singleton module"Stan Lo
This reverts commit https://github.com/ruby/irb/commit/169a9a2c3097. https://github.com/ruby/irb/commit/221b0a4928
3 days[ruby/irb] Memoize helper method instances with Singleton moduleStan Lo
Some helpers, like Rails console's `app`, requires memoization of the helper's ivars. To support it IRB needs to memoize helper method instances as well. https://github.com/ruby/irb/commit/169a9a2c30
4 daysSync IRB f9347b1 (#10611)Stan Lo
4 daysSkip test_inspect_under_gc_compact_stress w/ RJIT tooTakashi Kokubun
4 days[ruby/prism] Implement case equality on nodesPhilip Mueller
https://github.com/ruby/prism/commit/dc121e4fdf
5 days[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.94 to 0.9.97. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.94...v0.9.97) --- 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/05901be5db
5 days[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.94 to 0.9.97. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.94...v0.9.97) --- 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/e3069f2fd4
7 days[ruby/irb] Stop using ExtendCommandBundle internallyStan Lo
(https://github.com/ruby/irb/pull/925) This module was used to extend both commands and helpers when they're not separated. Now that they are, and we have a Command module, we should move command-related logic to the Command module and update related references. This will make the code easier to understand and refactor in the future. https://github.com/ruby/irb/commit/f74ec97236
7 days[ruby/zlib] Clear temporary directoryNobuyoshi Nakada
https://github.com/ruby/zlib/commit/1bed54dcf7
7 days[ruby/irb] Remove exit command workaround, handle IRB_EXIT intomoya ishida
debug_readline (https://github.com/ruby/irb/pull/923) * Remove exit and exti! command workaround when executed outside of IRB Command was a method. It could be executed outside of IRB. Workaround for it is no longer needed. * Handle IRB_EXIT in debug mode * Add exit and exit! command in rdbg mode https://github.com/ruby/irb/commit/0b5dd6afd0
7 daysensure ibf_load_setup is only passed String paramsZack Deveau
In cases where RubyVM::InstructionSequence.load_from_binary() is passed a param other than a String, we attempt to call the RSTRING_LENINT macro on it which can cause a segfault. ex: ``` var_0 = 0 RubyVM::InstructionSequence.load_from_binary(var_0) ``` This commit adds a type check to raise unless we are provided a String.
8 days[ruby/irb] Add MultiIRB commands testKuniaki Igarashi
(https://github.com/ruby/irb/pull/929) https://github.com/ruby/irb/commit/c6bbc424c3
8 days[ruby/reline] Implement `show-all-if-ambiguous` featureMari Imaizumi
(https://github.com/ruby/reline/pull/683) https://github.com/ruby/reline/commit/0fe4fdc794
9 days[ruby/irb] Fix % escape in prompt formattomoya ishida
(https://github.com/ruby/irb/pull/927) https://github.com/ruby/irb/commit/08eee25d28
9 days[ruby/irb] Accept " " for colorizing "\t" testtomoya ishida
(https://github.com/ruby/irb/pull/924) https://github.com/ruby/irb/commit/c8182fa490
9 daysAdd a hint of `ASCII-8BIT` being `BINARY`Jean Boussier
[Feature #18576] Since outright renaming `ASCII-8BIT` is deemed to backward incompatible, the next best thing would be to only change its `#inspect`, particularly in exception messages.
9 days[ruby/ipaddr] Add IPAddr.cidr to return ip address in cidr notationBen Fritsch
https://github.com/ruby/ipaddr/commit/f5b006741f
10 days[ruby/prism] Add a reflection API for determining the fields of a nodeKevin Newton
https://github.com/ruby/prism/commit/f3f9950a74
10 days[ruby/reline] Refactor nomultiline and multiline mode differencetomoya ishida
(https://github.com/ruby/reline/pull/653) * Support multiline input in Reline.readline internally, reduce multiline-singleline branch * Add readline(singleline) prompt test with force inserting multiline text https://github.com/ruby/reline/commit/97846095d7
10 daysrelax unused block warning for duck typingKoichi Sasada
if a method `foo` uses a block, other (unrelated) method `foo` can receives a block. So try to relax the unused block warning condition. ```ruby class C0 def f = yield end class C1 < C0 def f = nil end [C0, C1].f{ block } # do not warn ```
10 days[Feature #20335] `Thread.each_caller_location` argumentsNobuyoshi Nakada
Accecpt the same arguments as `caller` and `caller_locations`.
10 daysskip on Prism generated iseqKoichi Sasada
10 daystest_uplus_minus: Use a different string literalJean Boussier
This test fail relatively frequently and it's unclear what is happening. ``` str: {"address":"0x7fbdeb26d4e0", "type":"STRING", "shape_id":1, "slot_size":40, "class":"0x7fbdd1e0ec50", "frozen":true, "embedded":true, "fstring":true, "bytesize":3, "value":"bar", "encoding":"UTF-8", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} bar: {"address":"0x7fbdd0a8b138", "type":"STRING", "shape_id":1, "slot_size":40, "class":"0x7fbdd1e0ec50", "frozen":true, "embedded":true, "fstring":true, "bytesize":3, "value":"bar", "encoding":"UTF-8", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true}} ``` The `"bar".freeze` literal correctly put an old-gen fstring on the stack. But `-%w(b a r).join('')` returns a young-gen fstring, which suggest it somehow failed to find the old one in the `frozen_strings` table. This could be caused by another test corrupting the table, or corrupting the `"bar"` fstring. By using a different literal value we can learn whether the bug is specific to `"bar"` (used in many tests) or more general.
10 days`ISeq#to_a` respects `use_block` statusKoichi Sasada
```ruby b = RubyVM::InstructionSequence.compile('def f = yield; def g = nil').to_a pp b #=> ... {:use_block=>true}, ... ```
10 days[ruby/stringio] strio_read: preserve buffer encoding on partialJean byroot Boussier
reads (https://github.com/ruby/stringio/pull/95) [[Bug #20418]](https://bugs.ruby-lang.org/issues/20418) Ruby IO#read preserves the encoding on partial read, but change it when reading the whole IO from commit https://github.com/ruby/ruby/commit/0ca7036682da: > * io.c (read_all): should associate default external encoding. > * io.c (io_read): should NOT associate default external encoding. https://github.com/ruby/stringio/commit/073172da31 Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
11 days[ruby/reline] Implement changing editing modeMari Imaizumi
(https://github.com/ruby/reline/pull/681) https://github.com/ruby/reline/commit/501b9a6c5f
11 days[rubygems/rubygems] Honor a specified path as the temporary diretory if givenNobuyoshi Nakada
## The problem Currently the tests are executed in the fixed name directory "tmp" under the top source directory. However it makes the tests fail when the source path contains symlinks. Or unable to even start if the top source directory is read-only, e.g., remote-mounting in read-only mode from virtual machines. Also, with the fixed directory, there is no way to avoid `pend` in `TestGemPackage#test_extract_symlink_parent_doesnt_delete_user_dir`. ## The fix Instead of creating the fixed name directory, this PR allows to use a different path given with the environment variable "GEM_TEST_TMPDIR". The default path is, as well as the current behavior, "tmp" from the top source directory. ### Caveat It is the caller's responsibility to make the directory safe (owned, world unwritable, or sticky) when setting the environment variable. https://github.com/rubygems/rubygems/commit/bf00850656