Skip to content

Always yield two-elt ary from Hash#each to lambda#7373

Merged
headius merged 1 commit intojruby:masterfrom
headius:hash_each_lambda
Sep 22, 2022
Merged

Always yield two-elt ary from Hash#each to lambda#7373
headius merged 1 commit intojruby:masterfrom
headius:hash_each_lambda

Conversation

@headius
Copy link
Member

@headius headius commented Sep 22, 2022

This was never intended to dodge arity-checking and the original behavior was introduced with optimizations in Ruby 2.1. The new logic is to always yield a single two-element array when the target block is a lambda.

See https://bugs.ruby-lang.org/issues/12706

This was never intended to dodge arity-checking and the original
behavior was introduced with optimizations in Ruby 2.1. The new
logic is to always yield a single two-element array when the
target block is a lambda.

See https://bugs.ruby-lang.org/issues/12706
@headius headius added this to the JRuby 9.4.0.0 milestone Sep 22, 2022
@headius headius mentioned this pull request Sep 22, 2022
@headius headius merged commit eb13bde into jruby:master Sep 22, 2022
@headius headius deleted the hash_each_lambda branch September 22, 2022 07:06
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