[Rails-core] Hash#extract missing from activesupport core extensions

2014-08-13 Thread Peter Inglesby
Why does core_ext/hash/slice define Hash#slice, Hash#slice!, and Hash#extract!, but not extract? Would a patch be welcomed? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it,

Re: [Rails-core] Hash#extract missing from activesupport core extensions

2014-08-13 Thread Matt Jones
On Aug 13, 2014, at 11:18 AM, Peter Inglesby wrote: > Why does core_ext/hash/slice define Hash#slice, Hash#slice!, and > Hash#extract!, but not extract? Would a patch be welcomed? A non-destructive version of `extract!` would do exactly the same thing as `slice`: return a new Hash with only

Re: [Rails-core] Hash#extract missing from activesupport core extensions

2014-08-13 Thread Peter Inglesby
I realised that was a stupid question as soon as I hit send. Thanks for taking the time to reply. On 13 August 2014 18:28, Matt Jones wrote: > > On Aug 13, 2014, at 11:18 AM, Peter Inglesby > wrote: > > > Why does core_ext/hash/slice define Hash#slice, Hash#slice!, and > Hash#extract!, but no