Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure the receiver is modifiable before shrinking [Bug #17736] #4296

Merged
merged 2 commits into from
Mar 20, 2021

Conversation

nobu
Copy link
Member

@nobu nobu commented Mar 20, 2021

No description provided.

@nobu nobu changed the title Ensure the receiver is modifiable before shinking [Bug #17736] Ensure the receiver is modifiable before shrinking [Bug #17736] Mar 20, 2021
@nobu nobu merged commit e019dd2 into ruby:master Mar 20, 2021
@nobu nobu deleted the bug/17736-array-destructive-methods branch March 20, 2021 10:16
kachick added a commit to kachick/ruby that referenced this pull request Mar 20, 2021
…736]

refs:

* https://bugs.ruby-lang.org/issues/17736
* ruby#4296

This commit aims to cover following methods

* Hash#select!
* Hash#filter!
* Hash#keep_if
* Hash#reject!
* Hash#delete_if

I think these are not all.

---

* Ensure the receiver is modifiable or not
* Assert the receiver is not modified
nobu pushed a commit that referenced this pull request Mar 20, 2021
…736]

refs:

* https://bugs.ruby-lang.org/issues/17736
* #4296

This commit aims to cover following methods

* Hash#select!
* Hash#filter!
* Hash#keep_if
* Hash#reject!
* Hash#delete_if

I think these are not all.

---

* Ensure the receiver is modifiable or not
* Assert the receiver is not modified
matzbot pushed a commit that referenced this pull request May 23, 2021
…3fdfb27dac456827b004d9e66a44b15f8cd762: [Backport #17736]

	Ensure the receiver is modifiable before shrinking [Bug #17736]

	* Ensure the receiver is modifiable before shinking [Bug #17736]

	* Assert the receivers are not modified
	---
	 array.c                 |  1 +
	 test/ruby/test_array.rb | 36 ++++++++++++++++++++++++++++++++++++
	 2 files changed, 37 insertions(+)

	Some Hash destructive methods ensure the receiver modifiable [Bug
	 #17736]

	refs:

	* https://bugs.ruby-lang.org/issues/17736
	* #4296

	This commit aims to cover following methods

	* Hash#select!
	* Hash#filter!
	* Hash#keep_if
	* Hash#reject!
	* Hash#delete_if

	I think these are not all.

	---

	* Ensure the receiver is modifiable or not
	* Assert the receiver is not modified
	---
	 hash.c                 |  2 ++
	 test/ruby/test_hash.rb | 42 ++++++++++++++++++++++++++++++++++++++++++
	 2 files changed, 44 insertions(+)

	Hash#transform_values! ensures receiver modifiable in block [Bug
	 #17736]

	---
	 hash.c                 | 1 +
	 test/ruby/test_hash.rb | 9 +++++++++
	 2 files changed, 10 insertions(+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant