Fix README typos, remove obsolete Fixnum section, and clarify optional + values#2700
Merged
ericproulx merged 1 commit intomasterfrom May 8, 2026
Merged
Conversation
79e240d to
5c14346
Compare
Danger ReportNo issues found. |
…l + values Spelling and grammar: - "given on an `configuration`" → "based on a `configuration`" - "Accept` head" → "Accept` header" - "won't affects" → "won't affect" - "with' blocks" → "with` blocks" (mismatched quote) - `required :beer` / `:wine` / `:blah` → `requires` (the DSL method is `requires`; the samples as written would raise NoMethodError) - "the the [grape-entity]" → "the [grape-entity]" Accuracy: - §"Accept-Version Header": the strict-mode sentence said the 406 was raised when no correct `Accept` header was supplied; the middleware checks `HTTP_ACCEPT_VERSION`, so corrected to "Accept-Version". - "Rack::Etag" → "Rack::ETag" (correct class name). - Removed the "Integer/Fixnum and Coercions" section comparing Ruby 2.4 vs. earlier — `grape.gemspec` requires Ruby >= 3.2, where `Fixnum` no longer exists. Replaces an incorrect note about `requires + values + allow_blank` (closes #2631) with a correct note covering `optional + values`. The deleted note claimed `:allow_blank` defaults to `true` and that absence of `:allow_blank` does not prevent `:state` from receiving blank values — both wrong: `@allow_blank` defaults to `nil`, and `requires` already rejects `nil` via the values validator. The real quirk is `optional + values`: `ValuesValidator#validate_param!` short-circuits on `nil` whenever the param is optional at the root scope, so missing/`nil`/`""`-coerced-to-`nil` all pass. The new note documents that and shows `allow_blank: false` as the way to opt out while still allowing the key to be absent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5c14346 to
a8929f5
Compare
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.
Summary
Spelling/grammar:
Accuracy:
Replaces incorrect `values + allow_blank` note (closes #2631):
The old note claimed:
Both claims are wrong:
The real quirk is with `optional + :values`, where missing key, `nil`, and `""` (coerced to `nil` for Symbol) all pass. `ValuesValidator#validate_param!` short-circuits on `nil` for optional root-scope params (lib/grape/validations/validators/values_validator.rb:30) before `@allow_blank` is consulted. The new note documents that and shows `allow_blank: false` as the opt-out, with a behavior matrix verified end-to-end:
Test plan
🤖 Generated with Claude Code