[pull] master from ruby:master#836
Merged
pull[bot] merged 27 commits intoturkdevops:masterfrom Mar 9, 2026
Merged
Conversation
This cast is safe because `rb_absint_size` returns `nlz` within the range `0...CHAR_BIT`.
Use the appropriate modifier. `size_t` is not always `unsigned long`, even if the size is the same.
Replace the simple dump_hash method with dump_obj that can serialize Gem::Specification, Version, Platform, Requirement, Dependency, Hash, Array, Time, and String objects into YAML format. This enables pure-Ruby YAML serialization without depending on Psych. The serializer handles multiline strings (block scalars), special character quoting ($, !, &, *, :, @, %), and proper indentation for nested structures. ruby/rubygems@bffb238b35
Replace the simple regex-based load method with a full recursive
descent parser (parse_any) that handles nested hashes, arrays, block
scalars (| and |-), YAML anchors (&anchor) and aliases (*alias),
!ruby/object: type tags, flow notation ({} and []), and non-specific
tag stripping (! prefix).
Add helper methods: parse_block_scalar for multiline strings,
build_permitted_tags for security validation, unquote_simple for
type coercion (booleans, integers, timestamps, quoted strings),
and improve strip_comment to handle # inside quoted strings.
The parser returns raw Ruby data structures (Hash, Array, String)
with :tag metadata for typed objects, without yet reconstructing
Gem-specific objects.
ruby/rubygems@053b576c20
Add convert_to_spec and convert_any methods that transform parsed YAML data structures (with :tag metadata) back into Gem::Specification, Version, Platform, Requirement, and Dependency objects. Wire these into the load method so it returns fully reconstructed Gem objects. convert_to_spec normalizes specification_version to Integer, rdoc_options to Array of Strings, and other array fields (files, test_files, executables, requirements, extra_rdoc_files) to proper arrays. convert_any handles Gem::Version::Requirement (legacy) and validates requirement operators and dependency type symbols against permitted lists. ruby/rubygems@fe1a29ef2d
…YAML backend Add Gem.use_psych? and Gem.load_yaml branching so that YAMLSerializer is used by default, while Psych remains available via the use_psych config option in .gemrc or RUBYGEMS_USE_PSYCH environment variable. ruby/rubygems@d67561aa06 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ruby/rubygems@d81ae0a870 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ruby/rubygems@b4655ddeb2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ruby/rubygems@21c33bb482 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…h fallback ruby/rubygems@895c8799fc Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ruby/rubygems@9d54d0f830 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ruby/rubygems@825d4eba3c Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tests covering the full pure-Ruby YAML implementation: - Gem object serialization round-trips (dump and load) - YAML anchors and aliases (enabled and disabled) - Permitted classes and symbols validation - Real-world gemspec parsing (fileutils, rubygems-bundler) - Edge cases: empty requirements, Hash-to-Array normalization, rdoc_options conversion, flow notation, non-specific tags, comment-only documents, special character quoting ruby/rubygems@b38681e4e8
* I always had an interest about the benchmark stdlib and did significant contributions to it, notably 979ec8d. * Ref: https://bugs.ruby-lang.org/issues/21948
* The timeout could trigger before the `raise`. ruby/timeout@e4aa36096f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )