Repository navigation
Conversation
Without `gemspec` in the Gemfile, base64 is not part of the bundle, so `library 'base64'` in test_sig cannot find this gem and RBS silently falls back to the copy bundled in rbs's stdlib. The signature tests were therefore not testing sig/base64.rbs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The Gemfile has no
gemspec, so base64 itself is not in the bundle.library 'base64'intest_sig/test_base64.rbthen fails to find the gem, and RBS silently falls back to the copy of the signature bundled in rbs'sstdlib/base64/0. As a result,rake rbs:testdoes not testsig/base64.rbsat all: it still passes even ifsig/base64.rbshas a syntax error.Fix
Add
gemspecback to the Gemfile.It was removed in 55c6b8a (2020), when the gemspec still contained
bundle gemtemplate TODOs and Bundler 2.1 strictly validated path gemspecs, which madebundle installfail. The gemspec has since been fixed and Bundler no longer validates it that strictly, so it can be restored.Verification
With
bundle config set with sig:RBS::EnvironmentLoader.gem_sig_path("base64", nil)now points to this repository'ssig/rake rbs:testandrake testpassencode64insig/base64.rbstoIntegermakesrake rbs:testfail (before this change it still passed)The same fix was made in ruby/abbrev#15.
🤖 Generated with Claude Code