aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash/transform_values.rb
Commit message (Collapse)AuthorAgeFilesLines
* Follow up #34754bogdanvlviv2018-12-201-1/+1
| | | | | | | - Fix a few deprecation warnings - Remove testing of `Hash#slice` - Imporve test of `Hash#slice!` - Remove mention about `Hash#slice` from the guide
* Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-171-29/+2
| | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add comment to remove code when we are in Ruby 2.4Rafael Mendonça França2016-10-141-0/+1
|
* Use built-in #transform_values when available.Jesús Burgos2016-10-141-2/+2
| | | | | | | | | | | | The methods Hash#transform_values and Hash#transform_values! have been implemented in Ruby and they'll be available as part of the standard library. Here's the link to the discussion in Ruby's issue tracker: https://bugs.ruby-lang.org/issues/12512 These methods are implemented in C so they're expected to perform better.
* Return a sized Enumerator from Hash#{transform_values{!}|transform_keys{!}}Kenichi Kamiya2015-09-291-2/+2
|
* Merge pull request #21782 from ronakjangir47/transform_values_docsRafael Mendonça França2015-09-281-3/+8
|\ | | | | Updated docs for transform_keys & transform_values
| * Updated docs for transform_values [ci skip]Ronak Jangir2015-09-281-3/+8
| |
* | Speed up `Hash#transform_values` when emptySean Griffin2015-09-281-0/+1
|/ | | | | | | | | | | | | | | | We're calling this function on an empty hash as part of copying the attribute set during dirty checking initialization. The new structure caused a performance regression on loading records from the database. This causes `User.all.to_a` to perform about 10% faster w/ 10k records. Calculating ------------------------------------- User.all - master 9.000 i/100ms User.all - sg-fix-ar-regression 8.000 i/100ms ------------------------------------------------- User.all - master 81.236 (± 7.4%) i/s - 405.000 User.all - sg-fix-ar-regression 89.716 (± 7.8%) i/s - 448.000
* Return an Enumerator if no block is givenErik Michaels-Ober2014-07-121-0/+2
|
* Don't construct a Proc if no block is givenErik Michaels-Ober2014-07-121-1/+1
|
* Add `Hash#map_values` to ActiveSupportSean Griffin2014-06-291-0/+21
Didn't get a chance to convert existing code, I'll skim through the code base to make use of this later this afternoon.