aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Rename --mjit-min-calls to --mjit-call-threshold (#6731)Takashi Kokubun2022-11-143-37/+37
| | | for consistency with YJIT
* [ruby/error_highlight] Enable tests for TypeError and ArgumentErrorYusuke Endoh2022-11-141-16/+14
| | | | | | These tests were unintentionally disabled by `if false` https://github.com/ruby/error_highlight/commit/fa6d00d80d
* Fix invokebuiltin in Ruby MJITTakashi Kokubun2022-11-131-3/+9
| | | | | https://github.com/ruby/ruby/blob/45fe7f757522ed7d1d3ec754da59d41d45dd6bab/tool/ruby_vm/views/_mjit_compile_invokebuiltin.erb#L21 has not been ported correctly.
* [ruby/bigdecimal] Tweak check_rounding_mode_optionKenta Murata2022-11-131-2/+12
| | | | https://github.com/ruby/bigdecimal/commit/e1c6c9be25
* [ruby/irb] Simplify info command's testsStan Lo2022-11-111-154/+136
| | | | | | (https://github.com/ruby/irb/pull/440) https://github.com/ruby/irb/commit/5942949226
* Merge RubyGems/Bundler master from ee2f8398324af4bc1b95f7565ce2fda98126e026Hiroshi SHIBATA2022-11-114-10/+10
|
* [rubygems/rubygems] Store last check even when upgrade is not available and ↵Josef Šimánek2022-11-111-2/+73
| | | | | | fix test. https://github.com/rubygems/rubygems/commit/bcffc2b0a5
* [rubygems/rubygems] Use file in XDG_STATE_HOME directory to store last ↵Josef Šimánek2022-11-112-5/+8
| | | | | | update check timestamp. https://github.com/rubygems/rubygems/commit/0fbc4ace8a
* [rubygems/rubygems] Add 'call for update' to RubyGems install command.Josef Šimánek2022-11-113-0/+157
| | | | https://github.com/rubygems/rubygems/commit/05811f8248
* [rubygems/rubygems] github source should default to secure protocolJason Karns2022-11-111-2/+2
| | | | | | | | Bundler 2 switched to secure https here https://github.com/rubygems/rubygems/commit/c2e81f8ff63613871cc8b52653c5e176f8dafde3 Insecure protocols should be avoided to prevent MITM attacks. https://github.com/rubygems/rubygems/commit/758413364a
* Allow a float error for Regexp.timeoutYusuke Endoh2022-11-111-2/+6
| | | | | | | | | | | | | | | | | The tests failed on windows https://github.com/ruby/ruby/actions/runs/3440997073/jobs/5740085169#step:18:62 ``` 1) Failure: TestRegexp#test_s_timeout [D:/a/ruby/ruby/src/test/ruby/test_regexp.rb:1586]: <0.30000000000000004> expected but was <0.3>. 2) Failure: TestRegexp#test_timeout_shorter_than_global [D:/a/ruby/ruby/src/test/ruby/test_regexp.rb:1631]: <0.30000000000000004> expected but was <0.3>. ```
* [ruby/irb] Transform ls's --grep/-G option to keyword argsTakashi Kokubun2022-11-101-0/+38
| | | | | | | | | | | (https://github.com/ruby/irb/pull/437) * Transform ls's --grep/-G option to keyword args * Make --grep less flexible * Support -g instead of --grep * Suppress warnings from symbol aliases
* Run EnvUtil.apply_timeout_scale outside of assert_separatelyYusuke Endoh2022-11-111-10/+6
| | | | It does not work well in assert_separately
* [ruby/racc] Make racc test more flexible (for JRuby).Thomas E. Enebo2022-11-101-0/+2
| | | | | | | | | | JRuby uses these same files for testing racc. The existing logic will not find 'racc' in a JRuby project checkout. This change allows it to work by just assuming 'ruby -S racc' when running tests. This will not change C Ruby's detection when setting up tests (since earlier checks will find racc). https://github.com/ruby/racc/commit/b74ce5e018
* YJIT: Invalidate JIT code only for ISEQ_TRACE_EVENTS (#6695)Takashi Kokubun2022-11-101-0/+48
|
* [ruby/irb] Make $ and @ default aliasesTakashi Kokubun2022-11-101-2/+0
| | | | | | (https://github.com/ruby/irb/pull/438) https://github.com/ruby/irb/commit/0613589476
* Transition shape when object's capacity changesJemma Issroff2022-11-104-30/+34
| | | | | | | | | | | | | | | | This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
* Omit test on IO Buffers which relies on String being embeddedJemma Issroff2022-11-101-1/+5
| | | | | | | | | There is currently a bug ([#19084]) in how extended strings work in IO Buffers. Object Shapes changes will make the string in this test extended on 32 bit machines. Since this behavior is currently broken (unrelated to object shapes) on 32 bit machines, this test will then fail. We preemptively omit it so that this commit can be reverted once the bug is fixed.
* Fix bug in array pack with shared stringsJemma Issroff2022-11-101-0/+6
| | | | | If string literals are long and they become shared, we need to make them independent before we can write to them. [Bug #19116]
* [Bug #19100] Add `init_int32` function to `rb_random_interface_t`Nobuyoshi Nakada2022-11-101-0/+8
| | | | | Distinguish initialization by single word from initialization by array.
* Add version to the interface of Random extensionsNobuyoshi Nakada2022-11-101-4/+22
|
* Update timeout seconds for square testTSUYUSATO Kitsune2022-11-091-1/+1
|
* Update timeout secondsTSUYUSATO Kitsune2022-11-091-1/+1
|
* Fix and add regexp testsTSUYUSATO Kitsune2022-11-091-2/+22
|
* Make pending_interrupt?(Exception) workYusuke Endoh2022-11-091-0/+8
| | | | | | A patch from katsu (Katsuhiro Ueno) [Bug #19110]
* [ruby/irb] Add execute_lines to reduce command tests' boilerplateStan Lo2022-11-081-266/+157
| | | | | | | code (https://github.com/ruby/irb/pull/436) https://github.com/ruby/irb/commit/1595337149
* 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>