From: ruby-core@... Date: 2017-11-25T16:41:35+00:00 Subject: [ruby-core:83883] [Ruby trunk Feature#14128] Introduce Hash#delete default value Issue #14128 has been updated by marcandre (Marc-Andre Lafortune). Assignee set to matz (Yukihiro Matsumoto) I am in favor of this. ---------------------------------------- Feature #14128: Introduce Hash#delete default value https://bugs.ruby-lang.org/issues/14128#change-67921 * Author: gshutler (Garry Shutler) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: ---------------------------------------- Mirror `Hash#fetch(key [, default]) ��� obj` with `Hash#delete(key [, default]) ��� obj`. Allows for more concise extraction of a value from a hash with a default. ~~~ ruby # Currently a = hash.delete(:a) { 10 } # Becomes a = hash.delete(:a, 10) ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: