summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* mutex: Raise a ThreadError when detecting a fiber deadlock (#6680)Jean byroot Boussier2022-11-091-1/+21
| | | | | | | | | [Bug #19105] If no fiber scheduler is registered and the fiber that owns the lock and the one that try to acquire it both belong to the same thread, we're in a deadlock case. Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
* Fix false LocalJumpError when branch coverage is enabledYusuke Endoh2022-11-081-0/+14
| | | | | | | | | | | | | | | `throw TAG_BREAK` instruction makes a jump only if the continuation of catch of TAG_BREAK exactly matches the instruction immediately following the "send" instruction that is currently being executed. Otherwise, it seems to determine break from proc-closure. Branch coverage may insert some recording instructions after "send" instruction, which broke the conditions for TAG_BREAK to work properly. This change forces to set the continuation of catch of TAG_BREAK immediately after "send" (or "invokesuper") instruction. [Bug #18991]
* [ruby/irb] Support non-string input in show_sourceTakashi Kokubun2022-11-071-0/+34
| | | | | | | (https://github.com/ruby/irb/pull/430) * Support non-string input in show_source * Test show_source as a method
* [ruby/fileutils] Revert "FileUtils.rm* methods swallows only Errno::ENOENT ↵Yusuke Endoh2022-11-071-20/+0
| | | | | | | | | | | | when force is true" This reverts commit https://github.com/ruby/fileutils/commit/fa65d676ece9. This caused some incompatibility problems in real-world cases. https://bugs.ruby-lang.org/issues/18784#change-98927 https://bugs.ruby-lang.org/issues/18784#change-98967 https://github.com/ruby/fileutils/commit/42983c2553
* [rubygems/rubygems] Fix rubocop violationsPeter Zhu2022-11-071-2/+2
| | | | https://github.com/rubygems/rubygems/commit/cc12e68637
* [rubygems/rubygems] Drop support for HP-UXPeter Zhu2022-11-071-1/+0
| | | | | | Support for HP-UX was dropped in Ruby in ruby/ruby#5457. https://github.com/rubygems/rubygems/commit/a3a8df3582
* [Bug #19106] Normalize time at 24:00:00 with a timezone objectNobuyoshi Nakada2022-11-071-0/+5
|
* [ruby/irb] Silent the noise created when building Context in testsStan Lo2022-11-041-0/+1
| | | | https://github.com/ruby/irb/commit/27e4274b3c
* [ruby/irb] Suppress "switching inspect mode" messagesNobuyoshi Nakada2022-11-041-0/+2
| | | | https://github.com/ruby/irb/commit/ee068d039b
* [ruby/erb] Copy CGI.escapeHTML to ERB::Util.html_escapeTakashi Kokubun2022-11-041-0/+13
| | | | https://github.com/ruby/erb/commit/ac9b219fa9
* [ruby/irb] Provide a base test class and let tests restore encodingsStan Lo2022-11-0313-53/+63
| | | | | | | | | | | | | | | | | | | | | | | conveniently (https://github.com/ruby/irb/pull/429) * Create a base TestIRB::TestCase class * Save/restore encodings for tests that initializes InputMethod classes Because `RelineInputMethod#initializes` calls `set_encoding`, which changes stdio/out/err and Encoding's default encoding values, we need to make sure any test that directly or indirectly (e.g. through Context) initializes `RelineInputMethod` restores encodings. `ReadlineInputMethod` also changes encodings but currently no tests cover it. * Remove unnecessary TestHelper module Since we now have a base TestCase, without_rdoc can just live there. https://github.com/ruby/irb/commit/c2874ec121
* [ruby/irb] Allow non-identifier aliases like Pry's @ and $Takashi Kokubun2022-11-031-0/+58
| | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/426) * Allow non-identifier aliases * Move the configuration to IRB.conf * Avoid abusing method lookup for symbol aliases * Add more alias tests * A small optimization * Assume non-nil Context * Load IRB.conf earlier https://github.com/ruby/irb/commit/e23db5132e
* [ruby/irb] Require rubygems to run the test alone on ruby/rubyTakashi Kokubun2022-11-031-0/+1
| | | | | | `Gem` is not undefined on test-all https://github.com/ruby/irb/commit/08ac803d61
* YJIT: Make Code GC metrics available for non-stats builds (#6665)Takashi Kokubun2022-11-031-4/+4
|
* [ruby/irb] Fix build_context for ruby/ruby CITakashi Kokubun2022-11-031-1/+2
| | | | | | Co-Authored-By: Stan Lo <stan.lo@shopify.com> https://github.com/ruby/irb/commit/d1fe234a9a
* [ruby/irb] Require the entire irb lib in RubyLex testStan Lo2022-11-031-1/+1
| | | | | | | | | | (https://github.com/ruby/irb/pull/428) RubyLex is not designed to be used alone. It's usually used with an IRB context, which requires workspace. So its tests should have access to those components too. https://github.com/ruby/irb/commit/608f261da4
* [ruby/irb] Refactor RubyLex and its testsStan Lo2022-11-031-7/+22
| | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/irb/pull/427) * Make sure `RubyLex#set_input`'s context is always present in tests In real-world scenarios, the context should always be non-nil: https://github.com/ruby/irb/blob/master/lib/irb.rb#L489 So we should make sure our test setup reflects that. * Make context a required keyword Since in practice, `set_input`'s context should always be non-nil, its parameters should reflect that. And since `RubyLex#check_state` is only called by `#lex` and `#set_input`, both of which now always require context, we can assume its context should be non-nil too. https://github.com/ruby/irb/commit/1aeeb86203
* [ruby/erb] Skip a test for JRubyTakashi Kokubun2022-11-031-0/+3
| | | | https://github.com/ruby/erb/commit/48a75665ab
* [ruby/erb] Skip tests for trufflerubyTakashi Kokubun2022-11-032-0/+5
| | | | https://github.com/ruby/erb/commit/65a7c70a00
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2022-11-022-5/+5
| | | | | | | | | | | | | | | | | | | /test/rubygems/test_gem_ext_cargo_builder/custom_name Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.34 to 0.9.35. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.34...v0.9.35) --- 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/19feb314cb
* We don't care about actual hostname resolution. (#6652)Samuel Williams2022-11-011-1/+1
| | | https://bugs.ruby-lang.org/issues/18380
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2022-11-012-5/+5
| | | | | | | | | | | | | | | | | Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.34 to 0.9.35. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.34...v0.9.35) --- 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/73268e7af5
* YJIT: Add RubyVM::YJIT.code_gc (#6644)Takashi Kokubun2022-10-311-11/+6
| | | | | * YJIT: Add RubyVM::YJIT.code_gc * Rename compiled_page_count to live_page_count
* [ruby/error_highlight] Support nodes in `spot`eileencodes2022-10-311-0/+32
| | | | | | | | | | | | | | | Fixes a bug where `spot` was using the wrong local variable. We want to use error highlight with code that has been eval'd, specifically ERB templates. We can recover the compiled source code of the ERB template but we need an API to pass the node into error highlight's `spot`. Required Ruby PR: https://github.com/ruby/ruby/pull/6593 https://github.com/ruby/error_highlight/commit/0b1b650a59 Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* Add `node_id_for_backtrace_location` functioneileencodes2022-10-311-0/+13
| | | | | | | | | | | | | | | We want to use error highlight with eval'd code, specifically ERB templates. We're able to recover the generated code for eval'd templates and can get a parse tree for the ERB generated code, but we don't have a way to get the node id from the backtrace location. So we can't pass the right node into error highlight. This patch gives us an API to get the node id from the backtrace location so we can find the node in the AST. Error Highlight PR: https://github.com/ruby/error_highlight/pull/26 Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* [ruby/optparse] Add tests for `load(into:)`Nobuyoshi Nakada2022-10-291-0/+2
| | | | https://github.com/ruby/optparse/commit/51f7e060ee
* [ruby/optparse] Add tests for `OptionParser#load`Nobuyoshi Nakada2022-10-291-0/+139
| | | | https://github.com/ruby/optparse/commit/fb34a1d3a3
* [ruby/irb] Do not make non-existent XDG directory on startNobuyoshi Nakada2022-10-281-0/+3
| | | | | | | (https://github.com/ruby/irb/pull/357) https://github.com/ruby/irb/commit/298b134792
* [ruby/irb] Update regarding NO_COLOR valueNobuyoshi Nakada2022-10-281-0/+4
| | | | | | | | | | | | https://no-color.org has been updated (jcs/no_color#83): > Command-line software which adds ANSI color to its output by default should check for a `NO_COLOR` environment variable that, when present and **not an empty string** (regardless of its value), prevents the addition of ANSI color. https://github.com/ruby/irb/commit/46e0f7e370 Co-authored-by: Stan Lo <stan001212@gmail.com>
* [ruby/irb] Suppress sequence to inspect asian ambiguous width Nobuyoshi Nakada2022-10-281-1/+11
| | | | https://github.com/ruby/irb/commit/a7097c5b80
* [ruby/irb] Suppress "switching inspect mode" messages Nobuyoshi Nakada2022-10-281-0/+2
| | | | https://github.com/ruby/irb/commit/565eeb3c19
* [ruby/irb] Fix warnings in test_cmd.rbPeter Zhu2022-10-271-2/+2
| | | | | | | | Fixes this warning: warning: assigned but unused variable - err https://github.com/ruby/irb/commit/298fcb57a3
* [ruby/irb] Remove unnecessary test setup Stan Lo2022-10-271-4/+0
|
* [ruby/irb] Suppress warning for test which uses a locale non-existing on ↵Benoit Daloze2022-10-271-0/+2
| | | | GitHub Actions
* [ruby/irb] Remove unecesary and harmful pend for TruffleRuby in ↵Benoit Daloze2022-10-271-2/+0
| | | | | | | | TestRaiseNoBacktraceException * Specifically the second one causes `$HOME` to be unset, which breaks `File.expand_path('~')`. https://github.com/ruby/irb/commit/61963305f5
* [ruby/irb] Add missing require Stan Lo2022-10-271-0/+2
|
* [ruby/irb] Add test for IRB::InputCompletor::PerfectMatchedProcst00122022-10-271-4/+90
| | | | | | | | This proc displays rdoc document when the input matches certain symbols perfectly, like "String". It's commonly triggered with autocompletion but only has 1 test case. So this commit increases its test coverage. https://github.com/ruby/irb/commit/d85d719313
* [ruby/tmpdir] Warnings should contain the environment variable name Nobuyoshi Nakada2022-10-271-3/+3
|
* YJIT: Support nil and blockparamproxy as blockarg in send (#6492)Matthew Draper2022-10-261-3/+5
| | | | | Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: John Hawthorn <john@hawthorn.email>
* [ruby/irb] Remove unnecessary warning check on help commandStan Lo2022-10-261-5/+0
| | | | | | | | It's not an intentional behavior of the command and it behaves differently in different environments. So checking it actually brings more problem than benefit. https://github.com/ruby/irb/commit/b3203bc784
* [ruby/irb] Rename test_helper.rb to helper.rbPeter Zhu2022-10-263-2/+2
| | | | | | | | | The name test_helper.rb conflicts with the test_helper.rb in JSON, causing build failures. This commit renames test_helper.rb to helper.rb. https://github.com/ruby/irb/commit/b6a92bf6b3 Co-Authored-By: Stan Lo <stan001212@gmail.com>
* [ruby/irb] Don't insert new methods to Test::Unit::TestCasest00122022-10-263-2/+22
| | | | | | Ruby CI runs irb and other Ruby core/stdlib tests in the same process. So adding irb-specific helper to Test::Unit::TestCase could potentially pollute other components' tests and should be avoided.
* [ruby/irb] Suppress warningsStan Lo2022-10-261-2/+2
| | | | Co-authored-by: Peter Zhu <peter@peterzhu.ca>
* [ruby/irb] Add test for the help commandst00122022-10-261-0/+51
|
* [ruby/irb] Extract without_rdoc helperst00122022-10-261-13/+0
|
* [ruby/irb] Make sure Encoding's defaults are restored Stan Lo2022-10-251-2/+5
|
* YJIT: GC and recompile all code pages (#6406)Takashi Kokubun2022-10-251-3/+118
| | | | | when it fails to allocate a new page. Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
* [ruby/tmpdir] Ignore empty environment variablesNobuyoshi Nakada2022-10-251-0/+12
| | | | | | Fixes https://github.com/ruby/tmpdir/pull/17 https://github.com/ruby/tmpdir/commit/a79c727a5d
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2022-10-252-7/+7
| | | | | | | | | | | | | | | | | | | /test/rubygems/test_gem_ext_cargo_builder/custom_name Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.31 to 0.9.34. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.31...v0.9.34) --- 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/6af714b02c
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2022-10-242-7/+7
| | | | | | | | | | | | | | | | | Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.31 to 0.9.34. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.31...v0.9.34) --- 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/1882ad876f