summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-03[DOC] typo fix in ruby/file.cB. Burt
2025-12-02Avoid leaking fd in uminus_no_embed testJohn Hawthorn
2025-12-03Update default gems list at 1af7550114a0401229eda42de24a82 [ci skip]git
2025-12-03[ruby/rubygems] Bump Rubygems version to 4.0.0Hiroshi SHIBATA
https://github.com/ruby/rubygems/commit/9d744beb56
2025-12-03[ruby/rubygems] Bump Bundler version to 4.0.0Hiroshi SHIBATA
https://github.com/ruby/rubygems/commit/a55c485226
2025-12-02[DOC] About Float Imprecision (#15293)Burdette Lamar
2025-12-02[DOC] Harmonize #+ methodsBurdette Lamar
2025-12-02Bump actions/checkout in /.github/actions/setup/directoriesdependabot[bot]
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/1af3b93b6815bc44a9784bd300feb67ff0d1eeb3...8e8c483db84b4bee98b60c0593521ed34d9990e8) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02Bump actions/checkout from 6.0.0 to 6.0.1dependabot[bot]
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v6...v6.0.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-12-03[ruby/json] Fix macro argumentsNobuyoshi Nakada
`ALWAYS_INLINE()` and `NOINLINE()` are defined with one argument. https://github.com/ruby/json/commit/8fb727901e
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-02Cache array length in `rb_ary_join` (#15362)Luke Gruber
When all elements are strings, we never have to recalculate the length of the array because there are no conversion methods that are called, so the length will never change. This speeds up the fast path by ~10%. ```ruby a = ["1"*10, "2"*10, "3"*10, "4"*10, "5"*10] * 10 10_000_000.times do a.join end ``` ``` hyperfine --warmup 1 'ruby ../ruby2/test.rb' './exe/ruby ../ruby2/test.rb' Benchmark 1: ruby ../ruby2/test.rb Time (mean ± σ): 3.779 s ± 0.053 s [User: 3.754 s, System: 0.017 s] Range (min … max): 3.715 s … 3.874 s 10 runs Benchmark 2: ./exe/ruby ../ruby2/test.rb Time (mean ± σ): 3.411 s ± 0.038 s [User: 3.387 s, System: 0.017 s] Range (min … max): 3.360 s … 3.472 s 10 runs Summary ./exe/ruby ../ruby2/test.rb ran 1.11 ± 0.02 times faster than ruby ../ruby2/test.rb ```
2025-12-02[ruby/strscan] [DOC] Avoid being interpreted as a linkYuki Kurihara
(https://github.com/ruby/strscan/pull/180) Since `[](n)` is being interpreted as a Markdown link, it cannot be displayed as a method call. I have corrected this by escaping the brackets so that they are interpreted as strings rather than links. ### Before ri ``` #{}[n] | <tt>n</tt>th captured substring. | +nil+. ``` html <img width="424" height="217" alt="image" src="https://github.com/user-attachments/assets/b45601ab-ed1c-4b82-b112-325f12bde197" /> ### After ri ``` #[](n) | <tt>n</tt>th captured substring. | +nil+. ``` html <img width="489" height="217" alt="image" src="https://github.com/user-attachments/assets/1212c147-42a5-4f62-8667-a279ccff67a3" /> https://github.com/ruby/strscan/commit/b3d56867fd
2025-12-02[ruby/prism] Consolidate macro definitionsKevin Newton
https://github.com/ruby/prism/commit/cc0ca08757
2025-12-02[ruby/prism] Remove PM_OPTIONAL_LOCATION_NOT_PROVIDED_VALUE macroKevin Newton
https://github.com/ruby/prism/commit/1988615ce1
2025-12-02[ruby/prism] Further specialize PM_NODE_INITKevin Newton
https://github.com/ruby/prism/commit/7ab6d9df47
2025-12-02[ruby/prism] Introduce PM_NODE_FLAGS macroKevin Newton
https://github.com/ruby/prism/commit/a20afe1674
2025-12-02[ruby/prism] Specialize PM_NODE_INIT to reduce calls to locationKevin Newton
https://github.com/ruby/prism/commit/3e0b5c9eb7
2025-12-02[ruby/prism] Introduce PM_NODE_UPCAST macro for readabilityKevin Newton
https://github.com/ruby/prism/commit/7eb169513a
2025-12-02[ruby/psych] Properly set the message of Exceptions on TruffleRubyBenoit Daloze
* From https://github.com/truffleruby/truffleruby/commit/1f81db82d2969ff7c5de0dacdecb38252664f42c https://github.com/ruby/psych/commit/dbabe7aac6
2025-12-02[ruby/psych] Fix usage of rb_struct_initialize() to pass an Array of members ↵Benoit Daloze
values and not a Hash * rb_struct_initialize() does not accept a Hash, and it's very brittle to pass `[{...}]` and to rely on that C function using rb_keyword_given_p(). It basically worked accidentally, by having **members in the caller of the caller. Such logic when Struct#initialize is defined in Ruby (as in TruffleRuby) is basically impossible to implement, because it's incorrectly treating positional arguments as keyword arguments. * rb_struct_initialize() is used in CRuby to set members of Data instances in marshal.c (there is no rb_data_initialize() yet). There, the code passes an Array of members values for Data (and for Struct which are not `keyword_init: true`): https://github.com/ruby/ruby/blob/48c7f349f68846e10d60ae77ad299a38ee014479/marshal.c#L2150-L2176 So we should do the same in psych. * Rename to init_data since it's only used for Data. * See https://github.com/ruby/psych/pull/692#discussion_r2483947279. https://github.com/ruby/psych/commit/3550148378
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/prism] Fix the ripper translator to parse as the current rubyEarlopain
Otherwise, it uses the latest prism version https://github.com/ruby/prism/commit/86406f63aa
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-02Box: Free rb_classext_t struct for a box when the box is GCedSatoshi Tagomori
2025-12-02Box: Mark boxes when a class/module is originally defined in it.Satoshi Tagomori
When a class/module defined by extension libraries in a box, checking types of instances of the class needs to access its data type (rb_data_type_t). So if a class still exists (not GCed), the box must exist too (to be marked).
2025-12-02Box: Fix data type nameSatoshi Tagomori
2025-12-02Box: load_wrapping is not needed nowSatoshi Tagomori
Top level constants are defined on the Object class's constant table, and those constants can be referred as box::CONST_NAME from outside box. So load_wrapping() is not needed now.
2025-12-02ZJIT: Improve documentation and make it easy to generate the types graphBenoit Daloze
2025-12-02[ruby/rubygems] Make BUNDLE_LOCKFILE environment variable have precedence ↵Jeremy Evans
over lockfile method in Gemfile It would be simpler to do `options[:lockfile] ||= ENV["BUNDLE_LOCKFILE"]`, but that doesn't work as `options` is frozen. Fixes https://github.com/ruby/rubygems/pull/9117 https://github.com/ruby/rubygems/commit/6e3603a0e9
2025-12-02[ruby/optparse] Remove `const_set` and instead use explicit assignmentsSam Westerman
https://github.com/ruby/optparse/commit/6e2709a5fd
2025-12-02[ruby/rubygems] Improve banner message for the default command.Hiroshi SHIBATA
Co-authored-by: Benoit Daloze <eregontp@gmail.com> https://github.com/ruby/rubygems/commit/463488b439 Co-authored-by: Patrik Ragnarsson <patrik@starkast.net>
2025-12-02CI: Distclean mswinNobuyoshi Nakada
Use the given `make-command` instead of the hard-coded `make` command. TODO: Use it for `make up` as well, in the future.
2025-12-02Win32: Clean empty directoriesNobuyoshi Nakada
2025-12-02Win32: Clean timestamp directory for platformNobuyoshi Nakada
2025-12-02Win32: Remove bundled gems directoriesNobuyoshi Nakada
2025-12-02Win32: Clean minipreludeNobuyoshi Nakada
2025-12-02Win32: Remove DLL files linked by `prepare-vcpkg`Nobuyoshi Nakada
2025-12-02Win32: Support removing wildcards in middle of pathNobuyoshi Nakada
2025-12-02Win32: Clean generated sourcesNobuyoshi Nakada
2025-12-02Win32: Refine outputsNobuyoshi Nakada
- Suppress logos from sub makes. - Set the prompt for `for` command when `echo` is on.
2025-12-02Win32: Append `-p` option to `RMDIRS`Nobuyoshi Nakada
`rmdirs.bat` may require this option explicitly to remove parent directories, in the future.
2025-12-02Win32: Clean prismNobuyoshi Nakada
- intermediate source files - timestamp files - build directories
2025-12-02Win32: Remove extra suffix for sub-makeNobuyoshi Nakada
2025-12-02Win32: Fix removing symlinkNobuyoshi Nakada
Try `rd` first for symlink to a directory; `del` attemps to remove all files under the target directory, instead of the symlink itself.
2025-12-02Win32: Add `DLEXT` for clean-specNobuyoshi Nakada
2025-12-02Win32: Fix rm.bat removing non existent fileNobuyoshi Nakada
2025-12-02Win32: Fix @ in middle of commandsNobuyoshi Nakada
`@` is not a command, and cannot be placed after `||`.
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.