summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-05-01[ruby/prism] Support passing version 3.3.1Kevin Newton
https://github.com/ruby/prism/commit/445a0f0d22
2024-05-01[PRISM] Simplify prism error highlightingKevin Newton
2024-05-01[ruby/prism] CRuby error message for trailing underscore in numberKevin Newton
https://github.com/ruby/prism/commit/4e34f236d3
2024-05-01[ruby/prism] Mark errors for invalid symbolsKevin Newton
https://github.com/ruby/prism/commit/661884c4a3
2024-05-01[ruby/prism] Match CRuby interpolation semanticsKevin Newton
If a single string that is a static literal is interpolated, it does not impact whether or not the parent is a static literal. In this way, if you have something like a regular expression that interpolates a string literal, it's possible that you will end up pushing just a single regexp onto the stack as opposed to calling out to toregexp. https://github.com/ruby/prism/commit/4f096c2257
2024-05-01[PRISM] Properly precheck regexp for encoding issuesKevin Newton
2024-05-01[PRISM] Support interpolated regexp with encoding modifiersKevin Newton
2024-05-01Fix memory leak in Ripper.sexpPeter Zhu
rb_ast_dispose does not free the rb_ast_t causing it to be leaked. This commit changes it to use rb_ast_free instead. For example: require "ripper" 10.times do 100_000.times do Ripper.sexp("") end puts `ps -o rss= -p #{$$}` end Before: 27648 32512 37376 42240 47232 52224 57344 62208 67072 71936 After: 22784 22784 22784 22784 22912 22912 22912 22912 22912 22912
2024-05-01[ruby/irb] Support `IRB.conf[:BACKTRACE_FILTER]`Stan Lo
(https://github.com/ruby/irb/pull/917) * Use 'irbtest-' instead if 'irb-' as prefix of test files. Otherwise IRB would mis-recognize exceptions raised in test files as exceptions raised in IRB itself. * Support `IRB.conf[:BACKTRACE_FILTER]`` This config allows users to customize the backtrace of exceptions raised and displayed in IRB sessions. This is useful for filtering out library frames from the backtrace. IRB expects the given value to response to `call` method and return the filtered backtrace. https://github.com/ruby/irb/commit/6f6e87d769
2024-05-01Test for memory leakNobuyoshi Nakada
2024-04-30[ruby/delegate] test: remove needless mu_ppSutou Kouhei
It's for minitest. We don't need it with test-unit. https://github.com/ruby/delegate/commit/447cd43973
2024-04-30[ruby/reline] Fix completion dialog position when completed part istomoya ishida
wordwrapped (https://github.com/ruby/reline/pull/692) https://github.com/ruby/reline/commit/2d9acd16fe
2024-04-30[ruby/openssl] Remove trailing space in test_ssl.rbPeter Zhu
https://github.com/ruby/openssl/commit/911a31335f
2024-04-30[ruby/openssl] Add OpenSSL::Digest.digests to get a list of available digestsBart de Water
https://github.com/ruby/openssl/commit/08dd3c73b7
2024-04-30[ruby/openssl] Introduce basic support for `close_read` and `close_write`.Samuel Williams
https://github.com/ruby/openssl/commit/c99d24cee9
2024-04-30[ruby/irb] Restore MAIN_CONTEXT correctlytomoya ishida
(https://github.com/ruby/irb/pull/937) https://github.com/ruby/irb/commit/c41f460a70
2024-04-29[ruby/reline] Input with eof and no newline bugfixtomoya ishida
(https://github.com/ruby/reline/pull/671) https://github.com/ruby/reline/commit/0d66c335a1
2024-04-29[ruby/reline] Completely support full-width characters intomoya ishida
differential rendering (https://github.com/ruby/reline/pull/654) * Add a cut variation of Reline::Unicode.take_range method take_mbchar_range * Consider fullwidth take_range in differential rendering https://github.com/ruby/reline/commit/29714df09f
2024-04-29[ruby/reline] Handle mode condition in inputrcMari Imaizumi
(https://github.com/ruby/reline/pull/687) https://github.com/ruby/reline/commit/bed5fb3d77
2024-04-26[PRISM] Enable integer testKevin Newton
2024-04-26[PRISM] Use redundant return flagKevin Newton
2024-04-26[ruby/prism] Location#slice_lines, Node#slice_linesKevin Newton
https://github.com/ruby/prism/commit/9b61f6fdb3
2024-04-26[ruby/prism] Add a flag on returns when they are redundantKevin Newton
https://github.com/ruby/prism/commit/450541d2c3
2024-04-26[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
2024-04-26[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
2024-04-26[PRISM] Fix up if condition branch coverage locationKevin Newton
2024-04-26[PRISM] Fix up branch coverage for &. with blockKevin Newton
2024-04-26[PRISM] Enable branch coverage for if/unless conditionalsKevin Newton
2024-04-26[PRISM] Enable branch coverage for while/until loopsKevin Newton
2024-04-26[PRISM] Enable branch coverage for case pattern matchingKevin Newton
2024-04-26[PRISM] Enable branch coverage for caseKevin Newton
2024-04-26[PRISM] Enable branch coverage for &.Kevin Newton
2024-04-26[PRISM] Modify test_coverage to take prism into accountKevin Newton
2024-04-26[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
2024-04-25[ruby/reline] Fix inputrc nested $if $else $endif bugtomoya ishida
(https://github.com/ruby/reline/pull/689) https://github.com/ruby/reline/commit/0d8aea26ec
2024-04-25Don'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.
2024-04-25[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)
2024-04-25[PRISM] Enable more passing testsKevin Newton
2024-04-25[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
2024-04-24[ruby/prism] Warn for nested hashes as wellKevin Newton
https://github.com/ruby/prism/commit/76e802f59e
2024-04-24[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
2024-04-24[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
2024-04-24[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
2024-04-24[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
2024-04-23Sync IRB f9347b1 (#10611)Stan Lo
2024-04-23Skip test_inspect_under_gc_compact_stress w/ RJIT tooTakashi Kokubun
2024-04-23[ruby/prism] Implement case equality on nodesPhilip Mueller
https://github.com/ruby/prism/commit/dc121e4fdf
2024-04-22[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
2024-04-22[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
2024-04-20[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