summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2025-12-03[ruby/json] Fix handling of depthÉtienne Barrié
https://github.com/ruby/json/commit/ccca602274
2025-12-03[ruby/json] Fix duplicated test_unsafe_load_with_options test caseJean Boussier
https://github.com/ruby/json/commit/7b62fac525
2025-12-03[ruby/json] Reproduce C ext behavior of ignoring mutated depth in arraysÉtienne Barrié
https://github.com/ruby/json/commit/e0257b9f82
2025-12-03[ruby/json] Test and restore behavior around to_json changing depthÉtienne Barrié
When serializing an Array, and one of the elements of the Array requires calling `to_json`, if the depth is changed, it will be used for the next entries, which wasn't the case before https://github.com/ruby/json/commit/5abd43490714, and is not the case with TruffleRuby and JRuby. Additionally, with TruffleRuby and JRuby the state's depth after the `to_json` call is used to close the Array, which isn't the case with CRuby. https://github.com/ruby/json/commit/386b36fde5
2025-12-03[ruby/json] Improve `JSON.load` and `JSON.unsafe_load` to allow passing ↵Jean Boussier
options as second argument Otherwise it's very error prone. https://github.com/ruby/json/commit/c54de70f90
2025-12-03Handle NEWOBJ tracepoints settings fieldsJean Boussier
[Bug #21710] - struct.c: `struct_alloc` It is possible for a `NEWOBJ` tracepoint call back to write fields into a newly allocated object before `struct_alloc` had the time to set the `RSTRUCT_GEN_FIELDS` flags and such. Hence we can't blindly initialize the `fields_obj` reference to `0` we first need to check no fields were added yet. - object.c: `rb_class_allocate_instance` Similarly, if a `NEWOBJ` tracepoint tries to set fields on the object, the `shape_id` must already be set, as it's required on T_OBJECT to know where to write fields. `NEWOBJ_OF` had to be refactored to accept a `shape_id`.
2025-12-02Avoid leaking fd in uminus_no_embed testJohn Hawthorn
2025-12-03Check and raise semantics errors on nested variables captures in patternsyui-knk
This commit makes these codes to be invalid. ```ruby case 0 in [a] | 1 end case 0 in { a: b } | 1 end case 0 in [{ a: [{ b: [{ c: }] }] }] | 1 end ```
2025-12-02[ruby/prism] Clean up test excludesEarlopain
Mostly not having to list version-specific excludes when testing against ripper/parse.y Also don't test new syntax additions against the parser gems. The version support for them may (or may not) be expanded but we shouldn't bother while the ruby version hasn't even released yet. (ruby_parser translation is not versioned, so let as is for now) I also removed excludes that have since been implemented by parse.y https://github.com/ruby/prism/commit/e5a0221c37
2025-12-02[ruby/json] Don't call to_json on the return value of as_json for Float::NANÉtienne Barrié
https://github.com/ruby/json/commit/28c57df8f7
2025-12-02ZJIT: Optimize GetIvar for non-T_OBJECTBenoit Daloze
* All Invariant::SingleRactorMode PatchPoint are replaced by assume_single_ractor_mode() to fix https://github.com/Shopify/ruby/issues/875 for SingleRactorMode patchpoints.
2025-12-01Test CC invalidation for singleton classes of objects (#15360)Luke Gruber
I made a recent change where all the tests passed but it turns out it was still wrong. We didn't have any tests for CC invalidation on singletons of objects that aren't classes or modules.
2025-12-01ZJIT: Optimize variadic cfunc `Send` calls into `CCallVariadic` (#14898)Stan Lo
ZJIT: Optimize variadic cfunc Send calls into CCallVariadic
2025-11-30[ruby/prism] Update unicode tables to match that of CRubyKevin Newton
The unicode version has been updated upstream, which means new codepoints mapped to alpha/alnum/isupper flags. We need to update our tables to match. I'm purposefully not adding a version check here, since that is such a large amount of code. It's possible that we could include different tables depending on a macro (like UNICODE_VERSION) or something to that effect, but it's such a minimal impact on the running of the actual parser that I don't think it's necessary. https://github.com/ruby/prism/commit/78925fe5b6
2025-11-30[ruby/prism] Fully destroy call operator write argumentsKevin Newton
If we are about to delete a call operator write argument, it needs to be removed from the list of block exits as well. https://github.com/ruby/prism/commit/ebc91c2e39
2025-11-29[ruby/prism] Fix label interpolated stringKevin Newton
https://github.com/ruby/prism/commit/e3e2b1ed04
2025-11-29[ruby/prism] Handle invalid string pattern keyKevin Newton
When a pattern match is using a string as a hash pattern key and is using it incorrectly, we were previously assuming it was a symbol. In the case of an error, that's not the case. So we need to add a missing node in this case. https://github.com/ruby/prism/commit/f0b06d6269
2025-11-27Reorganize page documentations (#15154)Stan Lo
Re-organize page docs
2025-11-27[ruby/json] Respect Coder depth when generatingÉtienne Barrié
https://github.com/ruby/json/commit/9c36681b17
2025-11-27[ruby/json] Test current behavior regarding depth for CoderÉtienne Barrié
Coder currently ignores its depth and always resets it to 0 when generating a new JSON document. https://github.com/ruby/json/commit/cca1f38316
2025-11-27Fix argument handling in `IO::Buffer#each_byte` (#15309)TOMITA Masahiro
The method incorrectly ignored its first argument and treated the second argument as offset and the third as count. This change makes the first argument be treated as offset and the second as count. Also fix incorrect block parameter in comments.
2025-11-26Ensure we don't dereference fields_obj as QundefJohn Hawthorn
We rely on the GC to clear this when the GC is run on another EC than the cache.
2025-11-26Clear fields obj when removingJohn Hawthorn
This fixes a bug where the gen_fields_cache could become invalid when the last ivar was removed. Also adds more assertions.
2025-11-26[ruby/json] Test to_json using State#depthÉtienne Barrié
https://github.com/ruby/json/commit/ac0a980668
2025-11-26[ruby/json] Test depthÉtienne Barrié
https://github.com/ruby/json/commit/d02e40324a
2025-11-26[ruby/json] Test that depth of unfrozen State does not changeÉtienne Barrié
https://github.com/ruby/json/commit/9d32cf4618
2025-11-26[ruby/timeout] Revert "Suppress warnings in two tests"Nobuyoshi Nakada
This reverts commit https://github.com/ruby/timeout/commit/983cbf636a17, that is fixed by test-unit 3.7.3. https://github.com/ruby/timeout/commit/095207f270
2025-11-26[ruby/cgi] Skip unless `CGI::EscapeExt` methods are implementedNobuyoshi Nakada
https://github.com/ruby/cgi/commit/7b5a13952b
2025-11-26Revert miscommit at "Reset the cache variable before retrying"Nobuyoshi Nakada
This reverts commit 26a9e0b4e31f7b5a9cbd755e0a15823a8fa51bae partially.
2025-11-26Reset the cache variable before retryingNobuyoshi Nakada
2025-11-26Box: Add a test to drop the reference to a boxSatoshi Tagomori
2025-11-25vm_cc_new: don't assume `cme` is present.Jean Boussier
[Bug #21694] `vm_search_super_method` explictly calls `vm_cc_new` with `cme=NULL` when there is no super class.
2025-11-23[ruby/prism] Revert "Reject `p(p a, &block => value)` and similar"Kevin Newton
https://github.com/ruby/prism/commit/fef2c20777
2025-11-23[ruby/prism] Reject `p(p a, &block => value)` and similarEarlopain
They were being parsed as `p((p a, &block) => value)`. When we get to this point, we must not just have parsed a command call, always consuming the `=>` is not correct. Closes [Bug #21622] https://github.com/ruby/prism/commit/796ab0edf4
2025-11-23Don't use non blocking pipes for RUBY_CRASH_REPORTPeter Zhu
[Bug #21703] RUBY_CRASH_REPORT does not work in some cases when shelling out on Linux. For example, given the following shell script dump.sh: #!/usr/bin/env bash cat > /tmp/crash And we see it fails like this: $ RUBY_CRASH_REPORT="|dump.sh" ruby -rfiddle -e "Fiddle::Pointer.new(1, 10)[0]" cat: -: Resource temporarily unavailable
2025-11-23[Bug #21705] Fix segfaults on WindowsNobuyoshi Nakada
It should check the type of the argument and coercion before converting the encoding.
2025-11-22[ruby/openssl] asn1: refactor converting ASN1_OBJECT to stringKazuki Yamaguchi
ruby/openssl exposes OIDs to Ruby as strings in many places, but the conversion logic has been duplicated and the behavior is inconsistent. There are mainly two patterns: - Returns the short name associated with the OID/NID, or the dotted decimal notation if it is unknown to OpenSSL. - Returns the long name, or the dotted decimal notation. These patterns are implemented using different OpenSSL APIs and that caused subtle differences. Add helper functions ossl_asn1obj_to_string() and ossl_asn1obj_to_string_long_name() to unify the logic. Also, document the current behaviors where it is not yet done. The inconsistency was likely unintentional, but since it dates back to the original implementations, standardizing it now would cause more issues than it resolves. https://github.com/ruby/openssl/commit/2ea36c21a4
2025-11-22[ruby/openssl] pkey/ec: fix OpenSSL::PKey::EC::Group#curve_name for unknown ↵Kazuki Yamaguchi
curves EC_GROUP_get_curve_name() returns NID_undef when OpenSSL does not recognize the curve and there is no associated OID. Handle this case explicitly and return nil instead of the string "UNDEF", which should not be exposed outside the extension. https://github.com/ruby/openssl/commit/2c16821c07
2025-11-22[ruby/json] Fix the parser to not accept invalid escapesJean Boussier
Only `"\/bfnrtu` are valid after a backslash. https://github.com/ruby/json/commit/f7f8f552ed
2025-11-21[ruby/rubygems] Undeprecate Gem::Version#<=> against stringsJean Boussier
This pattern is extremely common across the ecosystem, I don't think it's reasonable to deprecate it. I understand the performance argument, but perhaps the dependency resolution algorithm can use another method that is private API and only works with two `Version` instance. https://github.com/ruby/rubygems/commit/024b4b547a
2025-11-21[ruby/json] Skip test failing with JRuby in CIÉtienne Barrié
https://github.com/ruby/json/commit/305d3832db
2025-11-21[ruby/json] Ractor-shareable JSON::CoderÉtienne Barrié
https://github.com/ruby/json/commit/58d60d6b76
2025-11-21[ruby/rubygems] bin/rubocop -aHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/fbf6fb667e
2025-11-21Use assert_match for uplevel optionHiroshi SHIBATA
2025-11-21[ruby/rubygems] Respect `BUNDLE_VERSION` config at Gem::BundlerVersionFinderHiroshi SHIBATA
If we use "system" variable in BUNDLE_VERSION on Bundler configuration, we can use bundler version provided by system installation. But the current logic returns the first activated version of bundler like 2.7.2. It makes to confuse users. https://github.com/ruby/rubygems/commit/4eb66d9549
2025-11-21[ruby/rubygems] Deprecate comparing Gem::Version objects with stringsAaron Patterson
Comparing version objects is a huge bottleneck in dependency solvers (like inside Bundler). I would like to make comparing version objects cheaper. Right now we support comparing version objects with strings by trying to coerce the string to a version. So for example: ```ruby Gem::Version.new("1") <=> "12" ``` I would like to deprecate and remove support for this feature so that we can reduce the overhead of `def <=>`. I'm not sure what version of RubyGems we could remove this from though. https://github.com/ruby/rubygems/commit/81b7602183
2025-11-21Fix multiple bugs in `IO::Buffer.map` and update its documentation. (#15264)Alexander Bulancov
- Buffer's size did not account for offset when mapping the file, leading to possible crashes. - Size and offset were not checked properly, leading to many situations raising EINVAL errors with generic messages. - Documentation was wrong.
2025-11-20ZJIT: Change the output on redefined method tests to verify the new ↵Kevin Menard
definition is used
2025-11-20ZJIT: Update test names to use the same convention as the HIR testsKevin Menard
2025-11-20ZJIT: Add tests for `opt_newarray_send` with target methods redefinedKevin Menard