Skip to content

Conversation

ericproulx
Copy link
Contributor

@ericproulx ericproulx commented Jul 13, 2025

Fix leaky slash handling in router

Summary

This PR addresses an issue with leaky slash handling in the router. While profiling grape-on-rack locally, I found multiple / that were retained for nothing.

Retained String Report
-----------------------------------
        28  "/"
        27  grape-2.4.0/lib/grape/router.rb:18
         1  grape-2.4.0/lib/grape/router.rb:22

@grape-bot
Copy link

grape-bot commented Jul 13, 2025

1 Warning
⚠️ There're library changes, but not tests. That's OK as long as you're refactoring existing code.

Generated by 🚫 Danger

@ericproulx ericproulx changed the title Fix leaky slash handling in router Fix leaky slash when normalizing Jul 13, 2025
@ericproulx ericproulx requested a review from dblock July 13, 2025 13:43
@dblock dblock merged commit ea45bc1 into ruby-grape:master Jul 13, 2025
47 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.

3 participants