summaryrefslogtreecommitdiff
path: root/spec/ruby
AgeCommit message (Collapse)Author
2026-01-08Avoid flaky test failures by retrying on local port conflicts (#15818)Misaki Shioi
This test obtains an available port number by calling `TCPServer.new`, then closes it and passes the same port number as `local_port` to `TCPSocket.new`. However, `TCPSocket.new` could occasionally fail with `Errno::EADDRINUSE` at the bind(2) step. I believe this happens when tests are run in parallel and another process on the same host happens to bind the same port in the short window between closing the `TCPServer` and calling `TCPSocket.new`. To address this race condition, the test now retries with a newly selected available port when such a conflict occurs.
2026-01-04Fix condition for UTF-8 default in magic_comment_spec.rbBenoit Daloze
2026-01-04UNIXSocket#recvfrom only returns the path on LinuxBenoit Daloze
* Notably it does not on BSD, macOS and Windows.
2026-01-04Remove assertion which does not holdBenoit Daloze
* https://github.com/ruby/ruby/actions/runs/20694508956/job/59407571754 1) UNIXSocket.pair emulates unnamed sockets with a temporary file with a path FAILED Expected "C:\\a\\_temp\\102424668889-2384.($)".match? /\\AppData\\Local\\Temp\\\d+-\d+\.\(\$\)\z/ to be truthy but was false
2026-01-04Get better error if UNIXSocket.socketpair spec failsBenoit Daloze
2026-01-04Update to ruby/spec@94dbd55Benoit Daloze
2026-01-04Update to ruby/spec@f54296dBenoit Daloze
2025-12-30Update version guards in ruby/specBenoit Daloze
2025-12-30[Bug #21784] Fix the Proc#source_location start_column for stabby lambdasBenoit Daloze
* Consistent with plain `blocks` and `for` blocks and methods where the source_location covers their entire definition. * Matches the documentation which mentions "where the definition starts/ends". * Partially reverts d357d50f0a74409446f4cccec78593373f5adf2f which was a workaround to be compatible with parse.y.
2025-12-30Reapply "[Feature #6012] Extend `source_location` for end positionBenoit Daloze
* This reverts commit 065c48cdf11a1c4cece84db44ed8624d294f8fd5. * This functionality is very valuable and has already taken 14 years to agree on the API. * Let's just document it's byte columns (in the next commit). * See https://bugs.ruby-lang.org/issues/21783#note-9
2025-12-29Remove deprecated support for to_set taking argumentsJeremy Evans
2025-12-26Remove `rb_iterate` deprecated since 1.9Nobuyoshi Nakada
2025-12-20Revert pack/unpack support for LEB128Nobuyoshi Nakada
https://bugs.ruby-lang.org/issues/21785#note-10 > It is too late to introduce it in Ruby 4.0, let's aim for 4.1. This reverts commits: * d0b72429a93e54f1f956b4aedfc25c57dc7001aa Add support for signed and unsigned LEB128 to pack/unpack. * 68a900e30b4ca1537d7975c3a619fd94fca7b084 add news for pack / unpack directives
2025-12-19Just passing FDs does not need to create IO objectsNobuyoshi Nakada
2025-12-18Add support for signed and unsigned LEB128 to pack/unpack.Aaron Patterson
This commit adds a new pack format command `R` and `r` for unsigned and signed LEB128 encoding. The "r" mnemonic is because this is a "vaRiable" length encoding scheme. LEB128 is used in various formats including DWARF, WebAssembly, MQTT, and Protobuf. [Feature #21785]
2025-12-18Update bundled bigdecimal and rbs (#15611)tomoya ishida
* Bundle rbs-3.10.0.pre.1 * Update rbs gem entry with commit hash Updated rbs entry to include commit hash. * Fix rbs entry in bundled_gems * Update rbs gem to version 3.10.0.pre.2 Updated rbs gem version from 3.10.0.pre.1 to 3.10.0.pre.2. * Update bundled bigdecimal to v4.0.1 --------- Co-authored-by: Soutaro Matsumoto <matsumoto@soutaro.com>
2025-12-16Box: fix the class name in testsNobuyoshi Nakada
2025-12-16Revert "[Feature #6012] Extend `source_location` for end positionNobuyoshi Nakada
and columns" This reverts commit 073c4e1cc712064e626914fa4a5a8061f903a637. https://bugs.ruby-lang.org/issues/6012#note-31 > we will cancel this feature in 4.0 because of design ambiguities > such as whether to return column positions in bytes or characters as > in [#21783]. [#21783]: https://bugs.ruby-lang.org/issues/21783
2025-12-10Add `NUM2PTR` and `PTR2NUM` macrosNobuyoshi Nakada
These macros have been defined here and there, so collect them.
2025-12-10Use `ruby_version_is`Nobuyoshi Nakada
As the markers for spec/mspec/tool/remove_old_guards.rb.
2025-12-10Use rb_error_frozen_object in rb_class_modify_checkJeremy Evans
This provides information on the class of the frozen object. It also results in a much simpler implementation. Fixes [Bug #21374]
2025-12-06Add error case tests for `File.path`Nobuyoshi Nakada
- for non-String argument - for NUL-contained argument - for ASCII-incompatible argument
2025-12-05[Bug #21764] Propagate the encoding of ID to warningNobuyoshi Nakada
2025-12-04Deprecate `rb_eval_cmd_kw`Nobuyoshi Nakada
2025-11-28Define Kernel#instance_variables_to_inspectJean Boussier
[Bug #21718] Otherwise objects that don't define it, but define a fairly liberal `method_missing` method will run into errors that are hard to understand: ```ruby class Foo def method_missing(name, ...) name end end p Foo.new.inspect ``` ``` 'Kernel#inspect': wrong argument type Symbol (expected Array) (TypeError) from ../test.rb:7:in '<main>' ```
2025-11-20Remove wrong testNobuyoshi Nakada
`realloc` is not guaranteed to return the same address when shrinking.
2025-11-19Update to ruby/spec@6e62695Benoit Daloze
2025-11-19Fix provided features spec with --repeat 2Benoit Daloze
2025-11-19Update to ruby/spec@2e11d2aCharles Oliver Nutter
2025-11-14[Feature #21572] Syntax error at capture in alternation patternNobuyoshi Nakada
Should fail even with `-c` option.
2025-11-14[Feature #21275] Bump Unicode version to 17.0.0Mari Imaizumi
2025-11-12erb/new_spec.rb: Fix a missing doTakashi Kokubun
2025-11-12erb/new_spec.rb: Update a version guardTakashi Kokubun
to the released version
2025-11-12erb/new_spec.rb: Fetch private ERB::VERSIONTakashi Kokubun
for erb v4.0.4 or older
2025-11-12Reapply "[ruby/erb] Reapply "Remove safe_level and further positional"Takashi Kokubun
This reverts commit 5b6658a406b5f1c535aed4cb68e8e18a3cbabb81. With a ruby spec fix.
2025-11-11[Bug #21666] Get rid of use of unspecified valuesNobuyoshi Nakada
2025-11-06Adjust OpenSSL specs for digest algorithm lookupKazuki Yamaguchi
https://github.com/ruby/openssl/pull/958 changed the common logic for digest algorithm lookup: - If the argument is neither an OpenSSL::Digest instance nor a String, it is now implicitly converted to String with #to_str. This is consistent with algorithm name lookup logic in ruby/openssl for pkeys and ciphers. - If the name is not recognized, OpenSSL::Digest::DigestError is raised instead of RuntimeError. Update the specs accordingly: - Remove specs that expect #to_str not to be called. - Relax regexps matching TypeError messages. - Expect OpenSSL::Digest::DigestError instead of RuntimeError for ruby/openssl 4.0.0 and later.
2025-11-05Use the exception class mentioned in the docNobuyoshi Nakada
Instead of an undocumented constant.
2025-11-04Resurrect tests for StringScanner#rest?Takashi Kokubun
that has not been obsolete. Partially reverting https://github.com/ruby/ruby/pull/15049.
2025-11-05Remove tests for obsolete StringScanner methodsNobuyoshi Nakada
ruby/strscan#168
2025-10-31[Bug #13671] Fix that "ss" in look-behind causes syntax errorK.Takata
Fixes k-takata/Onigmo#92. This fix was ported from oniguruma: https://github.com/kkos/oniguruma/commit/257082dac8c6019198b56324012f0bd1830ff4ba https://github.com/k-takata/Onigmo/commit/b1a5445fbeba97b3e94a733c2ce11c033453af73
2025-10-30[Feature #19630] Limit the versions with the old behaviorNobuyoshi Nakada
It is already declared as: > This behavior is slated to be removed in Ruby 4.0
2025-10-29Fix for other than UTF-8 environmentsNobuyoshi Nakada
2025-10-29Remove alternatives for ruby 1.8 and earliersNobuyoshi Nakada
2025-10-28Update to ruby/spec@3bc45baAndrew Konchin
2025-10-11Update bundled bigdecimal version (#14809)tomoya ishida
* Update bigdecimal spec * Update bundled bigdecimal to 3.3.1
2025-10-09FreeBSD returns EAI_FAIL instead of EAI_FAMILY in getaddrinfo and ↵Benoit Daloze
getnameinfo specs
2025-10-08Update to ruby/spec@3d7e563Benoit Daloze
2025-10-07Update rubyspec as of CVE-2025-27221Nobuyoshi Nakada
2025-10-05[ruby/pp] [Feature #21389] Update rubyspecNobuyoshi Nakada