summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Improve robustness of `io_wait` implementation. (#7456)Samuel Williams2023-03-071-13/+59
| | | | | - Restore correct handling of `duration`. - Don't delete from `@readable` or `@writable` unless it was added. - A little more documentation.
* Stop building mjit_build_dir.soTakashi Kokubun2023-03-061-5/+0
|
* Omit test_version for Cirrus for nowTakashi Kokubun2023-03-051-0/+1
|
* Remove an obsoleted testTakashi Kokubun2023-03-051-7/+0
|
* Skip a failing shape testTakashi Kokubun2023-03-051-0/+1
|
* Drop existing MJIT testsTakashi Kokubun2023-03-053-1450/+0
|
* [ruby/irb] Improve method completion for string and regexp thattomoya ishida2023-03-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | includes word break characters (https://github.com/ruby/irb/pull/523) * Improve method completion for string and regexp that includes word break characters * Remove completion-test's assert_not_include because candidates no longer include every possible methods * Add comment about string's method completion regexp Co-authored-by: Stan Lo <stan001212@gmail.com> * Add comment about regexp's method completion regexp Co-authored-by: Stan Lo <stan001212@gmail.com> --------- https://github.com/ruby/irb/commit/aa8128c533 Co-authored-by: Stan Lo <stan001212@gmail.com>
* [rubygems/rubygems] Introduce Gem::Specification.find_by_full_name for ↵Hiroshi SHIBATA2023-03-051-0/+17
| | | | | | finding conbination of name and version for gemspec https://github.com/rubygems/rubygems/commit/0430551215
* [ruby/irb] Drop chained methods' completion supportStan Lo2023-03-041-2/+0
| | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/529) Consider completion for this example: `foo.bar.b` Without type information, it is hard to know the return value of the `bar` method, so the current implementation interates through `ObjectSpace` to get all possible candidates for the second method. In small projects, the performance and accuracy are acceptable. But in bigger projects, the performance is unacceptable and the accuracy is mostly poor. So this commit drops the support for chained methods' completion.
* [ruby/reline] Fix completion with multilinetomoya ishida2023-03-041-0/+12
| | | | | | (https://github.com/ruby/reline/pull/513) https://github.com/ruby/reline/commit/d76c482c5f
* [ruby/irb] Remove no longer necessary TruffleRuby test exclusions.Kevin Menard2023-03-031-3/+1
| | | | | | | | (https://github.com/ruby/irb/pull/527) https://github.com/ruby/irb/commit/8473d0bc0f Co-authored-by: Stan Lo <stan.lo@shopify.com>
* [ruby/irb] Avoid slow symbol completion when completion target is antomoya ishida2023-03-031-0/+2
| | | | | | | empty symbol (https://github.com/ruby/irb/pull/534) https://github.com/ruby/irb/commit/35697f3ef3
* [ruby/irb] Fix prompt test not to change STDIO.external_encodingtomoya ishida2023-03-031-3/+5
| | | | | | (https://github.com/ruby/irb/pull/535) https://github.com/ruby/irb/commit/09f16259db
* [Bug #19471] `Regexp.compile` should handle keyword argumentsNobuyoshi Nakada2023-03-031-0/+5
| | | | | As well as `Regexp.new`, it should pass keyword arguments to the `Regexp#initialize` method.
* [rubygems/rubygems] Fix warning about ambiguous `/`David Rodríguez2023-03-031-1/+1
| | | | | | | | ``` /path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:745: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator ``` https://github.com/rubygems/rubygems/commit/e6a538b5c8
* [rubygems/rubygems] Fix warnings about unused variableDavid Rodríguez2023-03-031-4/+0
| | | | | | | | ``` /path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:180: warning: assigned but unused variable - platforms ``` https://github.com/rubygems/rubygems/commit/7e022cb5e3
* [rubygems/rubygems] Fix warning about ambiguous `*`David Rodríguez2023-03-031-1/+1
| | | | | | | | ``` /path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:42: warning: `*' interpreted as argument prefix ``` https://github.com/rubygems/rubygems/commit/0806ebf4e0
* [ruby/irb] Fix warnings because of `@context.main.delete`Nobuyoshi Nakada2023-03-031-2/+5
| | | | | | | | | | | If the main object of the context has `#delete` method, the following warning is printed. ``` irb: warn: can't alias delete from irb_delete. ``` https://github.com/ruby/irb/commit/00b39be61f
* [rubygems/rubygems] Enable `Layout/DefEndAlignment`David Rodríguez2023-03-021-1/+1
| | | | https://github.com/rubygems/rubygems/commit/4403613fae
* [ruby/irb] Handle long inspect and control character in prompttomoya ishida2023-03-021-0/+17
| | | | | | | | | | | string (https://github.com/ruby/irb/pull/528) * Handle long inspect and control characters in prompt string * Add constants for prompt truncate length, omission and replace pattern * Simply compare string instead of regexp in prompt truncation test
* Remove support for the Regexp.new 3rd argumentJeremy Evans2023-03-011-32/+0
| | | | | | This was deprecated in Ruby 3.2. Fixes [Bug #18797]
* [ruby/irb] Display and prioritise instance methods in `lsStan Lo2023-02-281-0/+60
| | | | | | | <module/class>` (https://github.com/ruby/irb/pull/496) https://github.com/ruby/irb/commit/e3d21f9329
* A file was missing in test/excludes for TestArraySubclasslukeg2023-02-281-0/+1
|
* fix test/rubygems/test_gem_package_task.rb when in -j modelukeg2023-02-286-22/+12
| | | | | | | | | This test skipped sometimes due to failure to load 'rake/packagetask'. This is due to manipulation of $LOAD_PATH by other rubygems tests. If rake is loaded before any rubygems tests run, then it works fine. To reproduce the skipping behavior: $ make test-all TESTOPTS="-j6 --test-order=sorted test/rubygems/test_*.rb"
* YJIT: Detect and reject `send(:alias_for_send, :foo)`Alan Wu2023-02-271-0/+20
| | | | | | | | | | | | | | | | | Previously, YJIT failed to put the stack into the correct shape when `BasicObject#send` calls an alias method for the send method itself. This can manifest as strange `NoMethodError`s in the final non-send receiver, as [seen][1] with the kt-paperclip gem. I also found a case where it makes YJIT fail the stack size assertion while compiling `leave`. YJIT's `BasicObject#__send__` implementation already rejects sends to `send`, but didn't detect sends to aliases of `send`. Adjust the detection and reject these cases. Fixes [Bug #19464] [1]: https://github.com/Shopify/yjit/issues/306
* [ruby/irb] Provide more useful message whenStan Lo2023-02-271-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | `IRB::Inspector#inspect_value` errors (https://github.com/ruby/irb/pull/511) **Before** ``` irb(main):001:0> c = Cat.new "foo" (Object doesn't support #inspect) => ``` **After** ``` irb(main):001:0> c = Cat.new "foo" An error occurred when inspecting the object: #<NoMethodError: undefined method `is_a?' for foo:Cat if obj.is_a?(String) ^^^^^^> Result of Kernel#inspect: #<Cat:0x0000000109090d80 @name="foo"> => ```
* [ruby/reline] Fix wrong indent number in prompt. whole_lines hastomoya ishida2023-02-273-7/+20
| | | | | | | | | | | | | duplicated line. (https://github.com/ruby/reline/pull/460) * whole_lines should consider prev_line_index, and must not duplicate last_line * Add test for lines passed to dynamic prompt proc * Refactor whole_lines parameters used in test helper * Remove whole_line's arguments
* Prefer to use File.foreach instead of IO.foreachHiroshi SHIBATA2023-02-273-3/+3
|
* Prefer to use File.readlines instead of IO.readlinesHiroshi SHIBATA2023-02-273-3/+3
|
* [ruby/reline] Fix the cause of test_yamatanooroti randomly failingtomoya ishida2023-02-271-0/+10
| | | | | | | | (https://github.com/ruby/reline/pull/474) * Add repeated input-delete test that fails on HEAD * Use raw mode while readmultiline
* Add all-ruby-quine as a sample codeYusuke Endoh2023-02-271-0/+32
| | | | This sample code works on all release versions of Ruby, from Ruby 0.49.
* Add `IO::Buffer.string` for efficient string creation. (#7364)Samuel Williams2023-02-251-0/+14
|
* YJIT: Generate Block::entry_exit with block entry PCAlan Wu2023-02-241-0/+41
| | | | | | | | | | | | | | | | Previously, when Block::entry_exit is requested from any instruction that is not the first one in the block, we generated the exit with an incorrect PC. We should always be using the PC for the entry of the block for Block::entry_exit. It was a simple typo. The bug was [introduced][1] while we were refactoring to use the current backend. Later, we had a chance to spot this issue while [preparing][2] to enable unused variable warnings, but didn't spot the issue. Fixes [Bug #19463] [1]: 27fcab995e6dde19deb91dc6e291bdb72100af68 [2]: 31461c7e0eab4963ccc8649ea8ebf27979132c0c
* Fix incorrect line numbers in GC hookPeter Zhu2023-02-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the previous instruction is not a leaf instruction, then the PC was incremented before the instruction was ran (meaning the currently executing instruction is actually the previous instruction), so we should not increment the PC otherwise we will calculate the source line for the next instruction. This bug can be reproduced in the following script: ``` require "objspace" ObjectSpace.trace_object_allocations_start a = 1.0 / 0.0 p [ObjectSpace.allocation_sourceline(a), ObjectSpace.allocation_sourcefile(a)] ``` Which outputs: [4, "test.rb"] This is incorrect because the object was allocated on line 10 and not line 4. The behaviour is correct when we use a leaf instruction (e.g. if we replaced `1.0 / 0.0` with `"hello"`), then the output is: [10, "test.rb"]. [Bug #19456]
* [ruby/irb] Cleanup completion testsStan Lo2023-02-241-18/+0
| | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/520) * Remove redundant completion test The test case was introduced to guard an old implementation, which relied on `Module#name`. Commit: https://github.com/ruby/irb/commit/8827d182746396dbf4499c2c1c8c0e9bf8375b7c However, the current implementation has avoided calling `Module#name` completely, so the test case is no longer necessary. Commit: https://github.com/ruby/irb/commit/88311ce3c84251e6f420246cd14efc96e00888be * Remove unnecessary pend
* [ruby/set] Set#merge does not take keyword arguments as a HashAkinori MUSHA2023-02-241-0/+4
| | | | https://github.com/ruby/set/commit/ca1c9532a9
* [ruby/set] Set#merge takes many enumerable objects like Hash#merge! doesAkinori MUSHA2023-02-241-1/+10
| | | | https://github.com/ruby/set/commit/becaca994d
* Implement ObjectSpace::WeakKeyMap basic allocatorJean Boussier2023-02-231-0/+112
| | | | [Feature #18498]
* Skip failing test on MSWinNobuyoshi Nakada2023-02-221-0/+1
|
* [rubygems/rubygems] Skip extension test on jrubySamuel Giddins2023-02-221-0/+2
| | | | https://github.com/rubygems/rubygems/commit/38ee82c297
* [rubygems/rubygems] Better teardownSamuel Giddins2023-02-221-2/+4
| | | | https://github.com/rubygems/rubygems/commit/5fa0ebf09b
* [rubygems/rubygems] Always join with a stringSamuel Giddins2023-02-221-0/+1
| | | | | | Gem.path_separator can also be a regexp... https://github.com/rubygems/rubygems/commit/7e6e56a5f3
* [rubygems/rubygems] Nil out Gem.configuration after testsSamuel Giddins2023-02-221-0/+1
| | | | https://github.com/rubygems/rubygems/commit/3135ad91d4
* [rubygems/rubygems] Use assert_raise instead of assert_raisesSamuel Giddins2023-02-221-1/+1
| | | | | | For ruby-core compat https://github.com/rubygems/rubygems/commit/c8f85c91a8
* [rubygems/rubygems] Add tests covering pre-releases for gem execSamuel Giddins2023-02-221-0/+104
| | | | https://github.com/rubygems/rubygems/commit/f6877c29b9
* [rubygems/rubygems] Fix resetting env in gem exec, and make sure it is set ↵Samuel Giddins2023-02-221-1/+1
| | | | | | for gem exec gem https://github.com/rubygems/rubygems/commit/13a6dd4992
* [rubygems/rubygems] Allow gem exec gemSamuel Giddins2023-02-221-0/+41
| | | | https://github.com/rubygems/rubygems/commit/a767f7b9be
* [rubygems/rubygems] Remove platform option for gem execSamuel Giddins2023-02-221-4/+144
| | | | | | Also fix native extensions that load dependencies https://github.com/rubygems/rubygems/commit/a06f9870c7
* [rubygems/rubygems] Ensure dependencies are updated by default when running ↵Samuel Giddins2023-02-221-8/+109
| | | | | | gem exec https://github.com/rubygems/rubygems/commit/664f3e1e5f
* [rubygems/rubygems] Add specs for gem execSamuel Giddins2023-02-221-0/+463
| | | | https://github.com/rubygems/rubygems/commit/3078e5834e