Skip to content

Fix renderable arity checks when method is overridden#57360

Merged
rafaelfranca merged 1 commit into
rails:mainfrom
chaadow:fix_renderable_method_method
May 14, 2026
Merged

Fix renderable arity checks when method is overridden#57360
rafaelfranca merged 1 commit into
rails:mainfrom
chaadow:fix_renderable_method_method

Conversation

@chaadow

@chaadow chaadow commented May 13, 2026

Copy link
Copy Markdown
Contributor

Use Kernel#method explicitly when checking a renderable object's render_in arity, so objects that define their own method reader do not break rendering. Along with a regression test.

More context: #50623 (comment)

cc @rafaelfranca / @seanpdoyle

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

Comment thread actionview/lib/action_view/template/renderable.rb
Comment thread actionview/lib/action_view/template/renderable.rb Outdated
Use Kernel#method explicitly when checking a renderable object's render_in arity, so objects that define their own method reader do not break rendering. Along with a regression test.

More context: rails#50623 (comment)
@chaadow chaadow force-pushed the fix_renderable_method_method branch from 619bfcc to 4870c5f Compare May 13, 2026 17:21
@chaadow chaadow requested a review from seanpdoyle May 13, 2026 18:12
@rafaelfranca rafaelfranca merged commit fb2ab3d into rails:main May 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants