Skip to content

Make closure to method conversion more conservative#8943

Merged
enebo merged 1 commit intojruby:masterfrom
enebo:topic/method_in_method
Aug 6, 2025
Merged

Make closure to method conversion more conservative#8943
enebo merged 1 commit intojruby:masterfrom
enebo:topic/method_in_method

Conversation

@enebo
Copy link
Member

@enebo enebo commented Aug 6, 2025

Add a new rule that a define_method closure cannot be converted to a method if it is within a method body.

This prevents implicit yields which want to yield to the outer methods block that was passed in.

Add a new rule that a define_method closure cannot be converted
to a method if it is within a method body.

This prevents implicit yields which want to yield to the outer
methods block that was passed in.
@enebo enebo added this to the JRuby 10.0.2.0 milestone Aug 6, 2025
@enebo enebo merged commit 5ffe48d into jruby:master Aug 6, 2025
72 checks passed
@enebo enebo deleted the topic/method_in_method branch August 6, 2025 16:21
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