Skip to content

Conversation

@ericproulx
Copy link
Contributor

@ericproulx ericproulx commented Mar 8, 2025

This PR fix #2544. It adds the ruby2_keyword_hash flag dynamically since its serialized in the namespace_stackable. Contrary to Rails, when calling use, insert, insert_before, its serializing the arguments and not calling the stack. Thus, ruby2_keywords have no meaning in Grape's stack.

Flag hash arg with `ruby2_keywords_hash`
Add spec
@ericproulx ericproulx marked this pull request as ready for review March 8, 2025 10:03
@block = block
end

def name; klass.name; end # rubocop:disable Style/SingleLineMethods
Copy link
Member

Choose a reason for hiding this comment

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

This seems silly to stick it to 1 line and disable a rubocop rule on it.

@dblock dblock merged commit 97f2413 into ruby-grape:master Mar 9, 2025
63 checks passed
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.

Unhandled keyword arguments for attaching middleware

2 participants