de en es fr nl pl pt sv zh

reject!

Ruby `reject!`

Accidentally Quadratic

The reject! method in Ruby selectively removes elements from an array in-place, based on a provided predicate (in the form of a block). Between Ruby 1.9.3 and Ruby 2.3, reject! was accidentally quadratic. The underlying bug was fairly straightforward. Every time the provided predicate returned...