summaryrefslogtreecommitdiff
path: root/spec/ruby
AgeCommit message (Collapse)Author
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
2025-10-01Interpolation with only string literals must not be frozenEarlopain
Basically a redo of https://github.com/ruby/ruby/commit/a1403fb7cbd1fe0df97c932be9814c86081783dc but respecting the frozen string literal magic comment Fixes [Bug #21187]
2025-09-16Fix a function name typo in the description [ci skip]Nobuyoshi Nakada
2025-09-14Remove tests do not test Regexp methodsNobuyoshi Nakada
The backslashs in these tests are parsed as escapes in string literals by the parser, but not passed to the `Regexp` methods.
2025-09-12Fix use of uninitialized memory in stringsPeter Zhu
Strings created from the C API with a len but no ptr have a buffer allocated and the length set, but the buffer is not zero'd. This causes use of uninitialized memory and allows reading memory that previously existed there. For example, the rb_str_tmp_new spec fails when we create a string with a large length greater than 24 bytes (since we zero the first 24 bytes of the slot).
2025-09-11Don't load set_spec.c if not Ruby 3.5Peter Zhu
2025-09-11Fix compilation of set_spec.c for previous Ruby versionsPeter Zhu
Set was moved to C only in Ruby 3.5, so it does not compile on Ruby 3.4 and earlier.
2025-09-08Add spec for missing or faulty `to_proc` methodsJean Boussier
Followup: https://github.com/ruby/ruby/pull/14463
2025-09-04feature_spec.rb: Don't test --enable-all with --zjit*Takashi Kokubun
2025-09-04rubyopt_spec.rb: Stop testing JIT optionsTakashi Kokubun
in child processes. `make test-spec SPECOPTS="spec/ruby/command_line/rubyopt_spec.rb -T --yjit"` fails because `ruby_exe` doesn't seem to propagate options to child processes.
2025-08-29Shrink ruby_bug version guard in anticipation of 3.4.6 releaseAlan Wu
Fix for this bug was merged into ruby_3_4 in 5a42d267bfabc86f86cae2e83de24b1b86bc316a and should go out in the next 3.4.x release.
2025-08-22Do not respect ruby2_keywords on method/proc with post argumentsJeremy Evans
Previously, ruby2_keywords could be used on a method or proc with post arguments, but I don't think the behavior is desired: ```ruby def a(*c, **kw) [c, kw] end def b(*a, b) a(*a, b) end ruby2_keywords(:b) b({foo: 1}, bar: 1) ``` This changes ruby2_keywords to emit a warning and not set the flag on a method/proc with post arguments. While here, fix the ruby2_keywords specs for warnings, since they weren't testing what they should be testing. They all warned because the method didn't accept a rest argument, not because it accepted a keyword or keyword rest argument.
2025-07-29Fix stripping features from the descriptionNobuyoshi Nakada