aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Implement SizedQueue#push(timeout: sec)Jean Boussier2022-08-181-0/+18
| | | | | | | [Feature #18944] If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised.
* Fix flaky test for GC thrashingPeter Zhu2022-08-171-0/+4
| | | | | GC could be in an intermediate state after creating the objects, so we should finish GC by running a minor GC.
* [ruby/cgi] Implement `CGI.url_encode` and `CGI.url_decode`Jean Boussier2022-08-161-1/+48
| | | | | | | | [Feature #18822] Ruby is somewhat missing an RFC 3986 compliant escape method. https://github.com/ruby/cgi/commit/c2729c7f33
* Update the excluding message for Psych [ci skip]Nobuyoshi Nakada2022-08-161-1/+4
|
* Optimize Marshal dump/load for large (> 31-bit) FIXNUM (#6229)John Hawthorn2022-08-151-1/+21
| | | | | | | | | | | | | | | | | | | | | | | * Optimize Marshal dump of large fixnum Marshal's FIXNUM type only supports 31-bit fixnums, so on 64-bit platforms the 63-bit fixnums need to be represented in Marshal's BIGNUM. Previously this was done by converting to a bugnum and serializing the bignum object. This commit avoids allocating the intermediate bignum object, instead outputting the T_FIXNUM directly to a Marshal bignum. This maintains the same representation as the previous implementation, including not using LINKs for these large fixnums (an artifact of the previous implementation always allocating a new BIGNUM). This commit also avoids unnecessary st_lookups on immediate values, which we know will not be in that table. * Fastpath for loading FIXNUM from Marshal bignum * Run update-deps
* Add test for GC thrashing of young object creationPeter Zhu2022-08-151-0/+22
| | | | This test will prevent performance regressions like [Bug #18929].
* [ruby/rinda] Handle situations where IPv4 multicast is not availableJeremy Evans2022-08-151-30/+41
| | | | | | Fixes [Bug #13864] https://github.com/ruby/rinda/commit/3cd620f38c
* [Bug #18962] Do not read again once reached EOFNobuyoshi Nakada2022-08-121-0/+14
| | | | | | | `Ripper::Lexer#parse` re-parses the source code with syntax errors when `raise_errors: false`. Co-Authored-By: tompng <tomoyapenguin@gmail.com>
* Remove Numeric#ceildivKouhei Yanagita2022-08-122-15/+0
|
* Add Numeric#ceildiv and Integer#ceildivKouhei Yanagita2022-08-123-0/+32
|
* Stop defining `RUBY_ABI_VERSION` if released versionsNobuyoshi Nakada2022-08-121-0/+2
| | | | | | 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.
* Fix inspect for unicode codepoint 0x85Jeremy Evans2022-08-111-0/+5
| | | | | | | | | | | | 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]
* Fix Array#[] with ArithmeticSequence with negative steps (#5739)Jeremy Evans2022-08-112-0/+142
| | | | | | | | | | | | | | | | | | | | | | * 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>
* Revert "Add {Method,UnboundMethod}#{public?,private?,protected?}"Jeremy Evans2022-08-101-51/+2
| | | | | | | | | | | | 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]
* [ruby/error_highlight] Make backtrace_location keyword workYusuke Endoh2022-08-101-0/+26
| | | | | | We had to keep backtrace_location before opts is overwritten. https://github.com/ruby/error_highlight/commit/2735e4681a
* [ruby/error_highlight] Make ErrorHighlight.spot accept Exception ↵Yusuke Endoh2022-08-101-1/+1
| | | | | | | | | (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
* Merge rubygems/bundler HEAD.Hiroshi SHIBATA2022-08-0910-19/+50
| | | | Pick from https://github.com/rubygems/rubygems/commit/dfbb5a38114640e0d8d616861607f3de73ee0199
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2022-08-092-5/+5
| | | | | | | | | | | | | | | | | | | /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
* Tentatively exclude the test that triggers ruby/psych#572Nobuyoshi Nakada2022-08-091-0/+1
|
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2022-08-092-5/+5
| | | | | | | | | | | | | | | | | 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
* [ruby/psych] Raise specific error when an anchor isn't definedAlexander Momchilov2022-08-092-2/+2
| | | | https://github.com/ruby/psych/commit/98fbd5247a
* [ruby/psych] Update to squiggly heredocs in the fileAlexander Momchilov2022-08-091-12/+12
| | | | https://github.com/ruby/psych/commit/42b43de997
* [ruby/psych] Add test for missing anchorAlexander Momchilov2022-08-091-0/+11
| | | | https://github.com/ruby/psych/commit/5f08137ae6
* [ruby/psych] Add test for anchor reuseAlexander Momchilov2022-08-091-0/+11
| | | | | | | 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
* [ruby/psych] Raise specific error when aliases are not enabledAlexander Momchilov2022-08-096-8/+8
| | | | https://github.com/ruby/psych/commit/0c11ddcf46
* [ruby/psych] Don't hardcode expected alias namesAlexander Momchilov2022-08-093-22/+28
| | | | https://github.com/ruby/psych/commit/b9ab19094f
* [ruby/psych] Test that recursive refs dump as aliasesAlexander Momchilov2022-08-093-0/+37
| | | | https://github.com/ruby/psych/commit/d9f7289190
* [ruby/psych] Clarify tests about parsing aliasesAlexander Momchilov2022-08-091-8/+21
| | | | https://github.com/ruby/psych/commit/0bc30cb4cb
* [ruby/date] Fix Time#to_datetime before calendar reformNobuyoshi Nakada2022-08-081-0/+17
| | | | | | | | | | 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
* [ruby/rdoc] Allow multiple footnotes without in-between blank linesNobuyoshi Nakada2022-08-081-1/+0
| | | | | | | | | | | | 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
* [rubygems/rubygems] Include backtrace with crashes by defaultDavid Rodríguez2022-08-051-5/+17
| | | | https://github.com/rubygems/rubygems/commit/3cc3bfd371
* Fix inconsistency with opt_aref_withJohn Hawthorn2022-08-041-0/+14
| | | | | | | | | | | | | | | | | | | | | 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.
* [rubygems/rubygems] Fix unused variable warningDavid Rodríguez2022-08-051-1/+1
| | | | | | | | ``` /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
* [rubygems/rubygems] Warn dangling symlinksDavid Rodríguez2022-08-042-1/+26
| | | | https://github.com/rubygems/rubygems/commit/425b78637f
* Harden Queue#pop timeout testsJean Boussier2022-08-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge rubygems/bundler HEADHiroshi SHIBATA2022-08-0310-20/+20
| | | | Pick from https://github.com/rubygems/rubygems/commit/8331e63263081a6aa690d8025d2957f30c4e814a
* [rubygems/rubygems] fix platform matching for index specsIlya Dyakonov2022-08-032-1/+14
| | | | https://github.com/rubygems/rubygems/commit/f087f1b590
* [rubygems/rubygems] Warn (rather than crash) when setting `nil` ↵David Rodríguez2022-08-033-5/+27
| | | | | | specification versions https://github.com/rubygems/rubygems/commit/a4ba1a4d97
* Implement Queue#pop(timeout: sec)Jean Boussier2022-08-022-11/+45
| | | | | | | | | [Feature #18774] As well as `SizedQueue#pop(timeout: sec)` If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised.
* [Bug #17767] Now `ENV.clone` raises `TypeError` as well as `ENV.dup`Nobuyoshi Nakada2022-08-021-42/+6
| | | | | | 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.
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2022-08-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.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
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2022-08-022-5/+5
| | | | | | | | | | | | | | | | | 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
* respect current frame of `rb_eval_string`Koichi Sasada2022-08-011-0/+12
| | | | | | | `self` is nearest Ruby method's `self`. If there is no ruby frame, use toplevel `self` (`main`). https://bugs.ruby-lang.org/issues/18780
* Implement Enumerator::Product and Enumerator.product [Feature #18685]Akinori MUSHA2022-07-301-0/+38
|
* [ruby/rdoc] Fix blockquote with word in verbatimNobuyoshi Nakada2022-07-301-0/+9
| | | | https://github.com/ruby/rdoc/commit/75eee668a5
* [flori/json] test parsing of unicode, mixing literal characters with escapedEthan2022-07-291-0/+4
| | | | https://github.com/flori/json/commit/82fe866da2
* [ruby/optparse] Also accept '-' as an optional argument ↵konsolebox2022-07-291-0/+6
| | | | | | (https://github.com/ruby/optparse/pull/35) https://github.com/ruby/optparse/commit/f2b8318631
* [ruby/rdoc] Fix formatting blockquote in verbatimNobuyoshi Nakada2022-07-291-0/+11
| | | | | | Reported at https://github.com/ruby/rdoc/pull/907#discussion_r932505816 https://github.com/ruby/rdoc/commit/86384ac7f9
* Revert "Try reproducing the MinGW hang on time command (#6168)"Takashi Kokubun2022-07-281-0/+7
| | | | | | | | | | | | 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.
* YJIT: Teach getblockparamproxy to handle the no-block case without exiting ↵Matthew Draper2022-07-281-0/+16
| | | | | | | | | (#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>