summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-08-12[Bug #18962] Do not read again once reached EOFNobuyoshi Nakada
`Ripper::Lexer#parse` re-parses the source code with syntax errors when `raise_errors: false`. Co-Authored-By: tompng <tomoyapenguin@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/6233
2022-08-12Remove Numeric#ceildivKouhei Yanagita
Notes: Merged: https://github.com/ruby/ruby/pull/5965
2022-08-12Add Numeric#ceildiv and Integer#ceildivKouhei Yanagita
Notes: Merged: https://github.com/ruby/ruby/pull/5965
2022-08-12Stop defining `RUBY_ABI_VERSION` if released versionsNobuyoshi Nakada
As commented in include/ruby/internal/abi.h, since teeny versions of Ruby should guarantee ABI compatibility, `RUBY_ABI_VERSION` has no role in released versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/6231
2022-08-11Fix inspect for unicode codepoint 0x85Jeremy Evans
This is an inelegant hack, by manually checking for this specific code point in rb_str_inspect. Some testing indicates that this is the only code point affected. It's possible a better fix would be inside of lower-level encoding code, such that rb_enc_isprint would return false and not true for codepoint 0x85. Fixes [Bug #16842] Notes: Merged: https://github.com/ruby/ruby/pull/4229
2022-08-11Fix Array#[] with ArithmeticSequence with negative steps (#5739)Jeremy Evans
* Fix Array#[] with ArithmeticSequence with negative steps Previously, Array#[] when called with an ArithmeticSequence with a negative step did not handle all cases correctly, especially cases involving infinite ranges, inverted ranges, and/or exclusive ends. Fixes [Bug #18247] * Add Array#slice tests for ArithmeticSequence with negative step to test_array Add tests of rb_arithmetic_sequence_beg_len_step C-API function. * Fix ext/-test-/arith_seq/beg_len_step/depend * Rename local variables * Fix a variable name Co-authored-by: Kenta Murata <3959+mrkn@users.noreply.github.com> Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2022-08-10Revert "Add {Method,UnboundMethod}#{public?,private?,protected?}"Jeremy Evans
This reverts commit 27278150685e738f84105d09843d3ba371146c7a and 58dc8bf8f15df9a33d191074e8a5d4946a3d59d5. Visibility is an attribute of the method entry in a class, not an attribute of the Method object. Fixes [#18729] Fixes [#18751] Fixes [#18435] Notes: Merged: https://github.com/ruby/ruby/pull/5974
2022-08-10[ruby/error_highlight] Make backtrace_location keyword workYusuke Endoh
We had to keep backtrace_location before opts is overwritten. https://github.com/ruby/error_highlight/commit/2735e4681a
2022-08-10[ruby/error_highlight] Make ErrorHighlight.spot accept Exception ↵Yusuke Endoh
(https://github.com/ruby/error_highlight/pull/25) ... and move things from core_ext.rb to base.rb. This will confine CRuby-dependent things to ErrorHighlight.spot. https://github.com/ruby/error_highlight/commit/22d1dd7824
2022-08-09Merge rubygems/bundler HEAD.Hiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/dfbb5a38114640e0d8d616861607f3de73ee0199 Notes: Merged: https://github.com/ruby/ruby/pull/6224
2022-08-09[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.28 to 0.9.29. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.28...v0.9.29) --- 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/77a945f0e8
2022-08-09Tentatively exclude the test that triggers ruby/psych#572Nobuyoshi Nakada
2022-08-09[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.28 to 0.9.29. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.28...v0.9.29) --- 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/d5d96f6bae
2022-08-09[ruby/psych] Raise specific error when an anchor isn't definedAlexander Momchilov
https://github.com/ruby/psych/commit/98fbd5247a
2022-08-09[ruby/psych] Update to squiggly heredocs in the fileAlexander Momchilov
https://github.com/ruby/psych/commit/42b43de997
2022-08-09[ruby/psych] Add test for missing anchorAlexander Momchilov
https://github.com/ruby/psych/commit/5f08137ae6
2022-08-09[ruby/psych] Add test for anchor reuseAlexander Momchilov
The spec calls this a "reuse" of an anchor https://yaml.org/spec/1.2.2/#71-alias-nodes https://github.com/ruby/psych/commit/57e3b70a56
2022-08-09[ruby/psych] Raise specific error when aliases are not enabledAlexander Momchilov
https://github.com/ruby/psych/commit/0c11ddcf46
2022-08-09[ruby/psych] Don't hardcode expected alias namesAlexander Momchilov
https://github.com/ruby/psych/commit/b9ab19094f
2022-08-09[ruby/psych] Test that recursive refs dump as aliasesAlexander Momchilov
https://github.com/ruby/psych/commit/d9f7289190
2022-08-09[ruby/psych] Clarify tests about parsing aliasesAlexander Momchilov
https://github.com/ruby/psych/commit/0bc30cb4cb
2022-08-08[ruby/date] Fix Time#to_datetime before calendar reformNobuyoshi Nakada
Time is always in the proleptic Gregorian calendar. Also DateTime#to_time should convert to the Gregorian calendar first, before extracting its components. https://bugs.ruby-lang.org/issues/18946#change-98527 https://github.com/ruby/date/commit/b2aee75248
2022-08-08[ruby/rdoc] Allow multiple footnotes without in-between blank linesNobuyoshi Nakada
https://github.com/ruby/ruby/commit/e4e054e3ce40 used four footnotes without blank lines. And the ChangeLog generated from that commit resulted in ``undefined method `parts' for nil`` error. For now, let a footnote terminated by the next footnote mark. Also refined the error message when undefined footnote is used. https://github.com/ruby/rdoc/commit/a7f290130b
2022-08-05[rubygems/rubygems] Include backtrace with crashes by defaultDavid Rodríguez
https://github.com/rubygems/rubygems/commit/3cc3bfd371
2022-08-04Fix inconsistency with opt_aref_withJohn Hawthorn
opt_aref_with is an optimized instruction for accessing a Hash using a non-frozen string key (ie. from a file without frozen_string_literal). It attempts to avoid allocating the string, and instead silently using a frozen string (hash string keys are always fstrings). Because this is just an optimization, it should be invisible to the user. However, previously this optimization was could be seen via hashes with default procs. For example, previously: h = Hash.new { |h, k| k.frozen? } str = "foo" h[str] # false h["foo"] # true when optimizations enabled This commit checks that the Hash doesn't have a default proc when using opt_aref_with. Notes: Merged: https://github.com/ruby/ruby/pull/6196
2022-08-05[rubygems/rubygems] Fix unused variable warningDavid Rodríguez
``` /Users/deivid/Code/rubygems/rubygems/test/rubygems/test_gem_resolver_installer_set.rb:55: warning: assigned but unused variable - a_1_local ``` https://github.com/rubygems/rubygems/commit/9ea4534800
2022-08-04[rubygems/rubygems] Warn dangling symlinksDavid Rodríguez
https://github.com/rubygems/rubygems/commit/425b78637f
2022-08-03Harden Queue#pop timeout testsJean Boussier
They occasionaly fail with; ``` FLeaked thread: TestThreadQueue#test_queue_pop_timeout: #<Thread:0x0000000108e38e48 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 sleep> .Finished thread: TestThreadQueue#test_deny_pushers: #<Thread:0x0000000108e38e48 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 dead> ... Retrying... 1) Failure: TestThreadQueue#test_sized_queue_pop_timeout [/Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:157]: <#<Thread:0x00000001084bc7e8 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:156 sleep>> expected but was <nil>. 2) Failure: TestThreadQueue#test_queue_pop_timeout [/Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:124]: <#<Thread:0x00000001083ff058 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 sleep>> expected but was <nil>. ``` I'm hoping joining for longer should help avoid this. Notes: Merged: https://github.com/ruby/ruby/pull/6210
2022-08-03Merge rubygems/bundler HEADHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/8331e63263081a6aa690d8025d2957f30c4e814a Notes: Merged: https://github.com/ruby/ruby/pull/6209
2022-08-03[rubygems/rubygems] fix platform matching for index specsIlya Dyakonov
https://github.com/rubygems/rubygems/commit/f087f1b590
2022-08-03[rubygems/rubygems] Warn (rather than crash) when setting `nil` ↵David Rodríguez
specification versions https://github.com/rubygems/rubygems/commit/a4ba1a4d97
2022-08-02Implement Queue#pop(timeout: sec)Jean Boussier
[Feature #18774] As well as `SizedQueue#pop(timeout: sec)` If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised. Notes: Merged: https://github.com/ruby/ruby/pull/6185
2022-08-02[Bug #17767] Now `ENV.clone` raises `TypeError` as well as `ENV.dup`Nobuyoshi Nakada
One year ago, the former method has been deprecated while the latter has become an error. Then the 3.1 released, it is enough time to make also the former an error. Notes: Merged: https://github.com/ruby/ruby/pull/6155
2022-08-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.26 to 0.9.28. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.26...v0.9.28) --- 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/edea8fbfa0
2022-08-02[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.26 to 0.9.28. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.26...v0.9.28) --- 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/831a001697
2022-08-01respect current frame of `rb_eval_string`Koichi Sasada
`self` is nearest Ruby method's `self`. If there is no ruby frame, use toplevel `self` (`main`). https://bugs.ruby-lang.org/issues/18780 Notes: Merged: https://github.com/ruby/ruby/pull/6199
2022-07-30Implement Enumerator::Product and Enumerator.product [Feature #18685]Akinori MUSHA
Notes: Merged: https://github.com/ruby/ruby/pull/6197
2022-07-30[ruby/rdoc] Fix blockquote with word in verbatimNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/75eee668a5
2022-07-29[flori/json] test parsing of unicode, mixing literal characters with escapedEthan
https://github.com/flori/json/commit/82fe866da2 Notes: Merged: https://github.com/ruby/ruby/pull/6200
2022-07-29[ruby/optparse] Also accept '-' as an optional argument ↵konsolebox
(https://github.com/ruby/optparse/pull/35) https://github.com/ruby/optparse/commit/f2b8318631 Notes: Merged: https://github.com/ruby/ruby/pull/6200
2022-07-29[ruby/rdoc] Fix formatting blockquote in verbatimNobuyoshi Nakada
Reported at https://github.com/ruby/rdoc/pull/907#discussion_r932505816 https://github.com/ruby/rdoc/commit/86384ac7f9
2022-07-28Revert "Try reproducing the MinGW hang on time command (#6168)"Takashi Kokubun
This reverts commit bee5089d6789401f265f87b2f23f1bd7ec63cec8. Looking at https://github.com/ruby/ruby/runs/7564065637?check_suite_focus=true, we concluded that the ruby process for test-all is stuck before exit when this issue reproduces. However, because of our limited bandwidth to support MinGW, we're not investigating this, and therefore we need to keep skipping tests that hang on this environment.
2022-07-28YJIT: Teach getblockparamproxy to handle the no-block case without exiting ↵Matthew Draper
(#6191) Teach getblockparamproxy to handle the no-block case without exiting Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: John Hawthorn <john@hawthorn.email> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-07-28Skip randomly failing tests with FreeBSD 12Hiroshi SHIBATA
2022-07-28Fix the missing bracketsHiroshi SHIBATA
2022-07-28test_io_console.rbL399 is also randomly failing same as ↵Hiroshi SHIBATA
bfc697f1e26f1406c45ec7309ca0d4c0b5ecedd6
2022-07-27Try reproducing the MinGW hang on time command (#6168)Takashi Kokubun
to see if it really exits correctly. GitHub Support asked me to confirm the command is exiting correctly. Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-07-26Fix `rb_profile_frames` output includes dummy main thread frameIvo Anjo
The `rb_profile_frames` API did not skip the two dummy frames that each thread has at its beginning. This was unlike `backtrace_each` and `rb_ec_parcial_backtrace_object`, which do skip them. This does not seem to be a problem for non-main thread frames, because both `VM_FRAME_RUBYFRAME_P(cfp)` and `rb_vm_frame_method_entry(cfp)` are NULL for them. BUT, on the main thread `VM_FRAME_RUBYFRAME_P(cfp)` was true and thus the dummy thread was still included in the output of `rb_profile_frames`. I've now made `rb_profile_frames` skip this extra frame (like `backtrace_each` and friends), as well as add a test that asserts the size and contents of `rb_profile_frames`. Fixes [Bug #18907] (<https://bugs.ruby-lang.org/issues/18907>) Notes: Merged: https://github.com/ruby/ruby/pull/6114
2022-07-26[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.20 to 0.9.26. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.20...v0.9.26) --- 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/fe76234cf1
2022-07-26[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.20 to 0.9.26. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.20...v0.9.26) --- 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/8b1d0672a3