aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [ruby/irb] Return only commands when completing help command'sStan Lo2024-07-052-2/+13
| | | | | | | | | | | | | argument (https://github.com/ruby/irb/pull/973) The command only takes command names as arguments, so we should only return command names as candidates. This will help users find a command faster as completion will be another useful hint too. https://github.com/ruby/irb/commit/7b6557cc24
* Fix flaky test_stat_heap_allPeter Zhu2024-07-051-5/+4
| | | | | | | We only collect GC.stat_heap(nil, stat_heap_all) once, outside of the loop, but assert_equal could allocate objects which can cause a GC to run and cause stat_heap_all to be out-of-sync.
* [rubygems/rubygems] Restrict generic `arm` to only match 32-bit armなつき2024-07-051-0/+9
| | | | https://github.com/rubygems/rubygems/commit/14c4c16e96
* [rubygems/rubygems] Use preferred add_dependency instead of ↵Jerome Dalbert2024-07-056-18/+18
| | | | | | add_runtime_dependency https://github.com/rubygems/rubygems/commit/9a08043858
* [rubygems/rubygems] Handle OpenSSL::SSL::SSLError in local https serverHiroshi SHIBATA2024-07-041-2/+2
| | | | https://github.com/rubygems/rubygems/commit/ccbbe84d77
* [rubygems/rubygems] Align code styles with rubocop and others.Hiroshi SHIBATA2024-07-042-16/+10
| | | | https://github.com/rubygems/rubygems/commit/c31a1592ee
* [rubygems/rubygems] Correctly handling fetcher leakHiroshi SHIBATA2024-07-041-1/+1
| | | | https://github.com/rubygems/rubygems/commit/c538558522
* [rubygems/rubygems] Removed needless variableHiroshi SHIBATA2024-07-041-3/+1
| | | | https://github.com/rubygems/rubygems/commit/29f71ee6d2
* [rubygems/rubygems] YAML is always enabledHiroshi SHIBATA2024-07-041-5/+1
| | | | https://github.com/rubygems/rubygems/commit/c755bcde62
* [rubygems/rubygems] Removed unused gzip codeHiroshi SHIBATA2024-07-041-11/+1
| | | | https://github.com/rubygems/rubygems/commit/ee45ebb5c3
* [rubygems/rubygems] Rewrite WEBrick server with TCPServer and ProxyHiroshi SHIBATA2024-07-041-52/+39
| | | | https://github.com/rubygems/rubygems/commit/3ae4358024
* [rubygems/rubygems] Rewrite WEBrick server with TCPServer and ↵Hiroshi SHIBATA2024-07-041-57/+47
| | | | | | OpenSSL::SSL::SSLServer https://github.com/rubygems/rubygems/commit/21319eccac
* [rubygems/rubygems] Cleanup needless code from HTTP/HTTPS testsHiroshi SHIBATA2024-07-042-216/+36
| | | | https://github.com/rubygems/rubygems/commit/69bd962b56
* [rubygems/rubygems] Split HTTP tests and HTTPS testsHiroshi SHIBATA2024-07-042-179/+374
| | | | https://github.com/rubygems/rubygems/commit/43f98b787b
* [rubygems/rubygems] Extract tests with local HTTP/HTTPS server from ↵Hiroshi SHIBATA2024-07-042-419/+447
| | | | | | TestGemRemoteFetcher https://github.com/rubygems/rubygems/commit/52db9fd501
* [rubygems/rubygems] Extract tests with S3 resources from TestGemRemoteFetcherHiroshi SHIBATA2024-07-042-213/+233
| | | | https://github.com/rubygems/rubygems/commit/d3ee8d2d3b
* Fix the return value of `Integer#downto` called with a blockNobuyoshi Nakada2024-07-041-6/+6
| | | | | As the document states, it should return `self`, not `nil`. Fix up of f4b313f7338f5fbe37f73aae29f70aeb474f7f5b.
* Move Array#map to RubyAaron Patterson2024-07-032-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves activerecord by about 1% on the interpreter: ``` before: ruby 3.4.0dev (2024-07-03T18:40:10Z master f88841b8f3) [arm64-darwin23] after: ruby 3.4.0dev (2024-07-03T18:41:14Z ruby-map 6c0df4eb32) [arm64-darwin23] ------------ ----------- ---------- ---------- ---------- ------------- ------------ bench before (ms) stddev (%) after (ms) stddev (%) after 1st itr before/after activerecord 235.2 0.8 233.6 0.7 1.01 1.01 ------------ ----------- ---------- ---------- ---------- ------------- ------------ Legend: - after 1st itr: ratio of before/after time for the first benchmarking iteration. - before/after: ratio of before/after time. Higher is better for after. Above 1 represents a speedup. ``` Improves YJIT by about 4%: ``` before: ruby 3.4.0dev (2024-07-03T18:40:10Z master f88841b8f3) +YJIT [arm64-darwin23] after: ruby 3.4.0dev (2024-07-03T18:41:14Z ruby-map 6c0df4eb32) +YJIT [arm64-darwin23] ------------ ----------- ---------- ---------- ---------- ------------- ------------ bench before (ms) stddev (%) after (ms) stddev (%) after 1st itr before/after activerecord 142.1 1.2 137.0 0.6 1.00 1.04 ------------ ----------- ---------- ---------- ---------- ------------- ------------ Legend: - after 1st itr: ratio of before/after time for the first benchmarking iteration. - before/after: ratio of before/after time. Higher is better for after. Above 1 represents a speedup. ```
* [ruby/irb] Introduce cd commandStan Lo2024-07-031-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/971) It's essentially a combination of pushws and popws commands that are easier to use. Help message: ``` Usage: cd ([target]|..) IRB uses a stack of workspaces to keep track of context(s), with `pushws` and `popws` commands to manipulate the stack. The `cd` command is an attempt to simplify the operation and will be subject to change. When given: - an object, cd will use that object as the new context by pushing it onto the workspace stack. - "..", cd will leave the current context by popping the top workspace off the stack. - no arguments, cd will move to the top workspace on the stack by popping off all workspaces. Examples: cd Foo cd Foo.new cd @ivar cd .. cd ``` https://github.com/ruby/irb/commit/4a0e0e89b7
* array.c: Remove outdated assertionsJean Boussier2024-07-031-0/+11
| | | | | | | | | | Following [Feature #20589] it can happen that we change the capacity of a frozen array, so these assertions no longer make sense. Normally we don't hit them because `Array#freeze` shrinks the array, but if somehow the Array was frozen using `Object#freeze` then we may shrink it after it was frozen.
* [Feature #20470] Split GC into gc_impl.cPeter Zhu2024-07-032-3/+3
| | | | | | | | | | | | | | | This commit splits gc.c into two files: - gc.c now only contains code not specific to Ruby GC. This includes code to mark objects (which the GC implementation may choose not to use) and wrappers for internal APIs that the implementation may need to use (e.g. locking the VM). - gc_impl.c now contains the implementation of Ruby's GC. This includes marking, sweeping, compaction, and statistics. Most importantly, gc_impl.c only uses public APIs in Ruby and a limited set of functions exposed in gc.c. This allows us to build gc_impl.c independently of Ruby and plug Ruby's GC into itself.
* [ruby/openssl] Add SSLSocket#readbyteGrant Gardner2024-07-033-0/+38
| | | | | | | Companion to getbyte but raise EOFError Similar to https://github.com/ruby/openssl/pull/438 https://github.com/ruby/openssl/commit/c40f70711a
* Add regression test for mutating pack's format stringAaron Patterson2024-07-021-0/+11
| | | | | | | | | It doesn't look like there was a test added for this bug, so I'm adding it. Code is from here: https://web.archive.org/web/20160908192307/http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/24445
* [ruby/fiddle] Pick ruby/ruby changes forHiroshi SHIBATA2024-07-021-0/+2
| | | | | | | | | | | | | `test/fiddle/test_function.rb` (https://github.com/ruby/fiddle/pull/141) https://github.com/ruby/ruby/pull/11048#issuecomment-2185630854 --------- https://github.com/ruby/fiddle/commit/a245f19763 Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
* [ruby/rdoc] Fix some typos (https://github.com/ruby/rdoc/pull/1129)Yudai Takada2024-07-013-4/+4
| | | | | | | | | | | | * constist ==> consist * Tidyness ==> Tidiness * Currentry ==> Currently * valus ==> values https://github.com/ruby/rdoc/commit/8412705721
* [ruby/irb] Allow assigning and using local variable name conflictingtomoya ishida2024-06-301-0/+45
| | | | | | | with command (https://github.com/ruby/irb/pull/961) https://github.com/ruby/irb/commit/00603d470f
* Fix corruption of internal encoding stringPeter Zhu2024-06-271-8/+14
| | | | | | | | | [Bug #20598] Just like [Bug #20595], Encoding#name_list and Encoding#aliases can have their strings corrupted when Encoding.default_internal is set to nil. Co-authored-by: Matthew Valentine-House <matt@eightbitraptor.com>
* Fix corruption of encoding name stringPeter Zhu2024-06-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | | [Bug #20595] enc_set_default_encoding will free the C string if the encoding is nil, but the C string can be used by the encoding name string. This will cause the encoding name string to be corrupted. Consider the following code: Encoding.default_internal = Encoding::ASCII_8BIT names = Encoding.default_internal.names p names Encoding.default_internal = nil p names It outputs: ["ASCII-8BIT", "BINARY", "internal"] ["ASCII-8BIT", "BINARY", "\x00\x00\x00\x00\x00\x00\x00\x00"] Co-authored-by: Matthew Valentine-House <matt@eightbitraptor.com>
* [ruby/prism] Handle block exits under modifiersKevin Newton2024-06-261-4/+4
| | | | https://github.com/ruby/prism/commit/6b78f5309b
* [rubygems/rubygems] Don't print warning about nil versions being discouraged ↵David Rodríguez2024-06-261-2/+2
| | | | | | during tests https://github.com/rubygems/rubygems/commit/39a47c264e
* [rubygems/rubygems] Add Specification#validate_for_resolutionThomas Marshall2024-06-251-0/+34
| | | | | | | | | | This method validates only what is required for resolution, skipping any irrelevant metadata validation. This will be used by Bundler instead of doing a full validation, allowing gem authors to use `bundle` commands immediately in newly created gems without first having to fix invalid metafata fields in the default gemspec. https://github.com/rubygems/rubygems/commit/da7704cfc0
* Move to test/.excludes-prismNobuyoshi Nakada2024-06-252-4/+2
|
* Pending `EVENT_RETURN` settracefunc tests with PrismNobuyoshi Nakada2024-06-251-0/+4
|
* [Bug #20457] Do not remove final `return` nodeNobuyoshi Nakada2024-06-252-3/+40
| | | | | This was an optimization for versions prior to 1.9 that traverse the AST at runtime.
* [ruby/reline] Rerender and enter raw mode again by SIGCONTtomoya ishida2024-06-251-0/+19
| | | | | | (https://github.com/ruby/reline/pull/727) https://github.com/ruby/reline/commit/be45660c83
* Handle hash and splat nodes in defined?Jeremy Evans2024-06-241-0/+35
| | | | | | | This supports the nodes in both in the parse.y and prism compilers. Fixes [Bug #20043] Co-authored-by: Kevin Newton <kddnewton@gmail.com>
* Fix `--debug-frozen-string-literal` to not apply ↵Jean Boussier2024-06-241-0/+11
| | | | | | | | | `--disable-frozen-string-literal` [Feature #20205] This was an undesired side effect. Now that this value is a triplet, we can't assume it's disabled by default.
* Extend the timeout of test_try_ldflag_invalid_opt and ↵Yusuke Endoh2024-06-241-2/+2
| | | | test_try_cppflag_invalid_opt
* Introduce retry to the setup of test files with TestFile#test_statYusuke Endoh2024-06-241-15/+27
| | | | | GitHub Actions macos-arm-oss is often too slow and does not timestamp as expected.
* Extend the timeout of Fiddle::TestFunction#test_nogvl_pollYusuke Endoh2024-06-241-2/+2
|
* Extend the timeout of TestVMDump#test_darwin_invalid_call, etc.Yusuke Endoh2024-06-241-1/+1
|
* Apply EnvUtil.apply_timeout_scale for TestFile#test_statYusuke Endoh2024-06-211-1/+1
| | | | | | | ... to respect RUBY_TEST_TIMEOUT_SCALE. This test somehow fails frequently on macos-arm-oss with --repeat-count=2 https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat?organizationId=ruby&workspaceId=ruby&testPathId=file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat&testSessionStatus=flake
* [PRISM] Remove duplicated testsKevin Newton2024-06-201-34/+0
| | | | | These tests are flaky and are duplicative of other tests that are run in CI when parser=prism.
* [rubygems/rubygems] Add a regression test for previous `bundler update ↵David Rodríguez2024-06-201-0/+2
| | | | | | --bundler` fix https://github.com/rubygems/rubygems/commit/c392593dc3
* [rubygems/rubygems] Check if failed with the expected errorNobuyoshi Nakada2024-06-201-3/+9
| | | | https://github.com/rubygems/rubygems/commit/3f22e9df8d
* [rubygems/rubygems] Revert "Workaround for TruffleRuby that set `nil` to ↵Nobuyoshi Nakada2024-06-201-2/+2
| | | | | | | | | LIBRUBY_RELATIVE" This reverts commit https://github.com/rubygems/rubygems/commit/06fd39997348, for a bug that is fixed by https://github.com/rubygems/rubygems/commit/0148cce153a5. https://github.com/rubygems/rubygems/commit/907e51e521
* String.new(capacity:) don't substract termlenJean Boussier2024-06-191-1/+1
| | | | | | | | | | [Bug #20585] This was changed in 36a06efdd9f0604093dccbaf96d4e2cb17874dc8 because `String.new(1024)` would end up allocating `1025` bytes, but the problem with this change is that the caller may be trying to right size a String. So instead, we should just better document the behavior of `capacity:`.
* [rubygems/rubygems] Do not set previously unset valueNobuyoshi Nakada2024-06-191-1/+2
| | | | https://github.com/rubygems/rubygems/commit/0148cce153
* [rubygems/rubygems] Workaround for TruffleRuby that set `nil` to ↵Nobuyoshi Nakada2024-06-191-2/+2
| | | | | | LIBRUBY_RELATIVE https://github.com/rubygems/rubygems/commit/06fd399973
* [rubygems/rubygems] Dump `RbConfig` elements to escape special charactersNobuyoshi Nakada2024-06-191-2/+2
| | | | | | | Naively embed strings do not work if special characters (newline, backslahes and so on) are contained. https://github.com/rubygems/rubygems/commit/ac2c4c4af1