Skip to content

Feature: Handle symbol-to-proc wrappers (&:) that refer to a method created using delegation or method missing#406

Open
marcrohloff wants to merge 4 commits into
ruby-grape:masterfrom
marcrohloff:feature/support-ampersand-blocks-for-delegated-methods
Open

Feature: Handle symbol-to-proc wrappers (&:) that refer to a method created using delegation or method missing#406
marcrohloff wants to merge 4 commits into
ruby-grape:masterfrom
marcrohloff:feature/support-ampersand-blocks-for-delegated-methods

Conversation

@marcrohloff
Copy link
Copy Markdown

These methods have a negative arity

… created using delegation or method missing

These methods have an arity of -1
@marcrohloff marcrohloff force-pushed the feature/support-ampersand-blocks-for-delegated-methods branch from 2b8851e to be995c1 Compare May 8, 2026 15:43
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Danger Report

No issues found.

View run

@dblock dblock requested a review from numbata May 10, 2026 23:56
Copy link
Copy Markdown
Collaborator

@numbata numbata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcrohloff Thanks for the contribution! The motivation is solid. 👍

Two things to address before merging: the arity <= 0 guard is too wide (see inline comment), and the new method_missing in the shared fixture risks making the "undefined method" test fragile. Left suggestions on both.

Comment thread lib/grape_entity/entity.rb Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread spec/grape_entity/entity_spec.rb Outdated
Comment thread spec/grape_entity/entity_spec.rb
Add argumenterror specs
@marcrohloff marcrohloff requested a review from numbata May 13, 2026 21:53
Comment thread lib/grape_entity/entity.rb Outdated
Comment thread spec/grape_entity/entity_spec.rb Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants