Skip to content

Use native argument forwarding in resource services (5.0.3) - #21

Merged
jlsync merged 2 commits into
masterfrom
codex/resource-service-forwarding
Nov 6, 2026
Merged

jlsync merged 2 commits into
masterfrom
codex/resource-service-forwarding

Conversation

@jlsync

@jlsync jlsync commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Resource service proxies capture and repack positional arguments, keywords, and blocks on each delegated call. Use Ruby’s native ... forwarding in ResourceService#method_missing, #find, #new, and SingletonResourceService#new to reduce temporary allocations while preserving custom finders and association routing. Leave destroy unchanged to preserve its existing block handling.

Add nine focused regression tests covering positional hashes, keyword and block forwarding, calls without keywords or blocks, and both custom finder forms. Bump rc_rails to 5.0.3 and add a brief changelog entry.

Validation: bundle exec rspec — 685 examples, 0 failures on Ruby 4.0.9 / Rails 8.1.4; git diff --check passes. Allocation measurements were made on Ruby 4.0.9; gains may vary on other supported Ruby versions.

jlsync and others added 2 commits November 6, 2026 23:19
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@jlsync
jlsync force-pushed the codex/resource-service-forwarding branch from 1c66f65 to 0a62d2d Compare November 6, 2026 22:20
@jlsync
jlsync merged commit 84854a0 into master Nov 6, 2026
6 checks passed
@jlsync
jlsync deleted the codex/resource-service-forwarding branch November 6, 2026 22:22
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.

1 participant