Skip to content

Passes the nonexistent key as a block argument in Array#delete - #6266

Merged
matz merged 2 commits into
mruby:masterfrom
dearblue:array-delete
May 14, 2024
Merged

matz merged 2 commits into
mruby:masterfrom
dearblue:array-delete

Conversation

@dearblue

Copy link
Copy Markdown
Contributor
a = %w(R G B A)
p a.delete("Y") { _1 }
# BEFORE => nil (same for mruby 3.3)
# AFTER  => "Y" (same for CRuby)

Also, the test code was not present, so I added it.

dearblue added 2 commits May 10, 2024 22:35
```ruby
a = %w(R G B A)
p a.delete("Y") { _1 }
# BEFORE => nil (same for mruby 3.3)
# AFTER  => "Y" (same for CRuby)
```
@dearblue
dearblue requested a review from matz as a code owner May 10, 2024 14:00
@github-actions github-actions Bot added the core label May 10, 2024
@matz
matz merged commit 156c7ec into mruby:master May 14, 2024
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