Skip to content

prefer using mrb_yield to call block arguments#6344

Merged
matz merged 1 commit into
mruby:masterfrom
leviongit:array/yield
Sep 5, 2024
Merged

prefer using mrb_yield to call block arguments#6344
matz merged 1 commit into
mruby:masterfrom
leviongit:array/yield

Conversation

@leviongit

Copy link
Copy Markdown
Contributor

since a block argument is guaranteed to be a Proc this shouldn't cause any problems and brings a moderate speed boost for methods like Array#sort!

@leviongit leviongit requested a review from matz as a code owner September 4, 2024 19:48
@github-actions github-actions Bot added the core label Sep 4, 2024
@matz matz merged commit 3ca3849 into mruby:master Sep 5, 2024
matz added a commit that referenced this pull request Sep 5, 2024
Since `blk` always comes from `mrb_get_args`, it should always be either
`nil` or a Proc.
@leviongit leviongit deleted the array/yield branch January 26, 2025 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants