Skip to content

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Dec 18, 2025

Copilot AI review requested due to automatic review settings December 18, 2025 05:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restores the Delegator.delegating_block method, replacing the previous delegating_code approach for defining special (non-standard) method names in delegated classes. The change simplifies the implementation by using a lambda with define_method instead of string-based code generation with module_eval.

  • Replaces delegating_code (which generated evaluable source code strings) with delegating_block (which returns a lambda)
  • Simplifies method definition for special methods (operators like [], ==, etc.) by using define_method with a lambda instead of module_eval with generated source code
  • Maintains proper keyword argument handling through .ruby2_keywords annotation on the lambda

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hsbt hsbt merged commit 1240efe into master Dec 18, 2025
32 checks passed
@hsbt hsbt deleted the v-0-6-1 branch December 18, 2025 05:36
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