summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-11-11Merge RubyGems/Bundler master from ee2f8398324af4bc1b95f7565ce2fda98126e026v3_2_0_preview3Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/6715
2022-11-11[rubygems/rubygems] Store last check even when upgrade is not available and ↵Josef Šimánek
fix test. https://github.com/rubygems/rubygems/commit/bcffc2b0a5 Notes: Merged: https://github.com/ruby/ruby/pull/6715
2022-11-11[rubygems/rubygems] Use file in XDG_STATE_HOME directory to store last ↵Josef Šimánek
update check timestamp. https://github.com/rubygems/rubygems/commit/0fbc4ace8a Notes: Merged: https://github.com/ruby/ruby/pull/6715
2022-11-11[rubygems/rubygems] Add 'call for update' to RubyGems install command.Josef Šimánek
https://github.com/rubygems/rubygems/commit/05811f8248 Notes: Merged: https://github.com/ruby/ruby/pull/6715
2022-11-11[rubygems/rubygems] github source should default to secure protocolJason Karns
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 Notes: Merged: https://github.com/ruby/ruby/pull/6715
2022-11-11Allow a float error for Regexp.timeoutYusuke Endoh
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>. ```
2022-11-10[ruby/irb] Transform ls's --grep/-G option to keyword argsTakashi Kokubun
(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
2022-11-11Run EnvUtil.apply_timeout_scale outside of assert_separatelyYusuke Endoh
It does not work well in assert_separately
2022-11-10[ruby/racc] Make racc test more flexible (for JRuby).Thomas E. Enebo
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
2022-11-10YJIT: Invalidate JIT code only for ISEQ_TRACE_EVENTS (#6695)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-10[ruby/irb] Make $ and @ default aliasesTakashi Kokubun
(https://github.com/ruby/irb/pull/438) https://github.com/ruby/irb/commit/0613589476
2022-11-10Transition shape when object's capacity changesJemma Issroff
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> Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Omit test on IO Buffers which relies on String being embeddedJemma Issroff
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. Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Fix bug in array pack with shared stringsJemma Issroff
If string literals are long and they become shared, we need to make them independent before we can write to them. [Bug #19116] Notes: Merged: https://github.com/ruby/ruby/pull/6704
2022-11-10[Bug #19100] Add `init_int32` function to `rb_random_interface_t`Nobuyoshi Nakada
Distinguish initialization by single word from initialization by array.
2022-11-10Add version to the interface of Random extensionsNobuyoshi Nakada
2022-11-09Update timeout seconds for square testTSUYUSATO Kitsune
2022-11-09Update timeout secondsTSUYUSATO Kitsune
2022-11-09Fix and add regexp testsTSUYUSATO Kitsune
2022-11-09Make pending_interrupt?(Exception) workYusuke Endoh
A patch from katsu (Katsuhiro Ueno) [Bug #19110] Notes: Merged: https://github.com/ruby/ruby/pull/6689
2022-11-08[ruby/irb] Add execute_lines to reduce command tests' boilerplateStan Lo
code (https://github.com/ruby/irb/pull/436) https://github.com/ruby/irb/commit/1595337149
2022-11-09mutex: Raise a ThreadError when detecting a fiber deadlock (#6680)Jean byroot Boussier
[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> Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-11-08Fix false LocalJumpError when branch coverage is enabledYusuke Endoh
`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] Notes: Merged: https://github.com/ruby/ruby/pull/6688
2022-11-07[ruby/irb] Support non-string input in show_sourceTakashi Kokubun
(https://github.com/ruby/irb/pull/430) * Support non-string input in show_source * Test show_source as a method
2022-11-07[ruby/fileutils] Revert "FileUtils.rm* methods swallows only Errno::ENOENT ↵Yusuke Endoh
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
2022-11-07[rubygems/rubygems] Fix rubocop violationsPeter Zhu
https://github.com/rubygems/rubygems/commit/cc12e68637
2022-11-07[rubygems/rubygems] Drop support for HP-UXPeter Zhu
Support for HP-UX was dropped in Ruby in ruby/ruby#5457. https://github.com/rubygems/rubygems/commit/a3a8df3582
2022-11-07[Bug #19106] Normalize time at 24:00:00 with a timezone objectNobuyoshi Nakada
2022-11-04[ruby/irb] Silent the noise created when building Context in testsStan Lo
https://github.com/ruby/irb/commit/27e4274b3c
2022-11-04[ruby/irb] Suppress "switching inspect mode" messagesNobuyoshi Nakada
https://github.com/ruby/irb/commit/ee068d039b
2022-11-04[ruby/erb] Copy CGI.escapeHTML to ERB::Util.html_escapeTakashi Kokubun
https://github.com/ruby/erb/commit/ac9b219fa9
2022-11-03[ruby/irb] Provide a base test class and let tests restore encodingsStan Lo
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
2022-11-03[ruby/irb] Allow non-identifier aliases like Pry's @ and $Takashi Kokubun
(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
2022-11-03[ruby/irb] Require rubygems to run the test alone on ruby/rubyTakashi Kokubun
`Gem` is not undefined on test-all https://github.com/ruby/irb/commit/08ac803d61
2022-11-03YJIT: Make Code GC metrics available for non-stats builds (#6665)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-03[ruby/irb] Fix build_context for ruby/ruby CITakashi Kokubun
Co-Authored-By: Stan Lo <stan.lo@shopify.com> https://github.com/ruby/irb/commit/d1fe234a9a
2022-11-03[ruby/irb] Require the entire irb lib in RubyLex testStan Lo
(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
2022-11-03[ruby/irb] Refactor RubyLex and its testsStan Lo
(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
2022-11-03[ruby/erb] Skip a test for JRubyTakashi Kokubun
https://github.com/ruby/erb/commit/48a75665ab
2022-11-03[ruby/erb] Skip tests for trufflerubyTakashi Kokubun
https://github.com/ruby/erb/commit/65a7c70a00
2022-11-02[rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]
/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
2022-11-01We don't care about actual hostname resolution. (#6652)Samuel Williams
https://bugs.ruby-lang.org/issues/18380 Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-11-01[rubygems/rubygems] Bump rb-sysdependabot[bot]
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
2022-10-31YJIT: Add RubyVM::YJIT.code_gc (#6644)Takashi Kokubun
* YJIT: Add RubyVM::YJIT.code_gc * Rename compiled_page_count to live_page_count Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-10-31[ruby/error_highlight] Support nodes in `spot`eileencodes
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>
2022-10-31Add `node_id_for_backtrace_location` functioneileencodes
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> Notes: Merged: https://github.com/ruby/ruby/pull/6593
2022-10-29[ruby/optparse] Add tests for `load(into:)`Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/51f7e060ee
2022-10-29[ruby/optparse] Add tests for `OptionParser#load`Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/fb34a1d3a3
2022-10-28[ruby/irb] Do not make non-existent XDG directory on startNobuyoshi Nakada
(https://github.com/ruby/irb/pull/357) https://github.com/ruby/irb/commit/298b134792
2022-10-28[ruby/irb] Update regarding NO_COLOR valueNobuyoshi Nakada
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>