Skip to content
  • nagachika's avatar
    44b87adc
    merge revision(s)... · 44b87adc
    nagachika authored
    merge revision(s) e019dd24,7954bb05,7d3fdfb2: [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
    	* https://github.com/ruby/ruby/pull/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(+)
    44b87adc
    merge revision(s)...
    nagachika authored
    merge revision(s) e019dd24,7954bb05,7d3fdfb2: [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
    	* https://github.com/ruby/ruby/pull/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(+)
Loading