From: shevegen@... Date: 2019-07-04T09:53:44+00:00 Subject: [ruby-core:93537] [Ruby master Bug#15984] deleting from a collection while iterating on it Issue #15984 has been updated by shevegen (Robert A. Heiler). I don't think ruby should disallow this via an exception. The use case seems fairly odd, too - it is often more idiomatic to do .map, .select, .reject etc... ---------------------------------------- Bug #15984: deleting from a collection while iterating on it https://bugs.ruby-lang.org/issues/15984#change-79101 * Author: aothelal (Abdelrahman Othman Helal) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.6.3 * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- If you tried to delete from a collection while iterating on it Ruby will allow you to do this flawlessly. This generates a wrong output collection after doing this action. An exception should be thrown to disallow this to be done. -- https://bugs.ruby-lang.org/ Unsubscribe: