From: dsisnero@... Date: 2020-11-10T19:41:59+00:00 Subject: [ruby-core:100765] [Ruby master Feature#17315] Hash #transform Issue #17315 has been reported by dsisnero (Dominic Sisneros). ---------------------------------------- Feature #17315: Hash #transform https://bugs.ruby-lang.org/issues/17315 * Author: dsisnero (Dominic Sisneros) * Status: Open * Priority: Normal ---------------------------------------- Add a new methods to 'transform' and 'transform!' a hash providing both key and value and returning hash. #7793 h = { 'name' => 'dominic ', 'email' => 'dominic.mail.com '} h.transform!{|k,v| [k.to_sym, v.strip]} h is now { name: 'dominic', email: 'dominic.mail.com} -- https://bugs.ruby-lang.org/ Unsubscribe: