Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge branch 'master' into make-reverse-merge-bang-order-consistent | Sean Griffin | 2017-07-17 | 1 | -702/+17 |
|\ | |||||
| * | [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` | Koichi ITO | 2017-07-11 | 1 | -0/+1 |
| | | |||||
| * | Use frozen-string-literal in ActiveSupport | Kir Shatrov | 2017-07-09 | 1 | -0/+1 |
| | | |||||
| * | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
| * | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | | |||||
| * | Move HashWithIndifferentAccess tests to separate file | Michael Stock | 2017-03-30 | 1 | -712/+0 |
| | | |||||
| * | Add aliases for reverse_merge to with_defaults | Matt Casper | 2017-03-29 | 1 | -0/+25 |
| | | | | | | | | | | | | In the context of controller parameters, reverse_merge is commonly used to provide defaults for user input. Having an alias to reverse_merge called with_defaults feels more idiomatic for Rails. | ||||
* | | Make the order of Hash#reverse_merge! consistent with HashWithIndifferentAccess | Erol Fornoles | 2017-03-06 | 1 | -2/+5 |
|/ | |||||
* | Add few tests for the top level `HashWithIndifferentAccess` | Robin Dupret | 2017-02-25 | 1 | -0/+24 |
| | | | | | This ensures that if we try to hard-deprecate it again in the future, we won't break these behaviors. | ||||
* | Soft-deprecate the top-level HashWithIndifferentAccess class | Robin Dupret | 2017-02-25 | 1 | -0/+4 |
| | | | | | | | Since using a `ActiveSupport::Deprecation::DeprecatedConstantProxy` would prevent people from inheriting this class and extending it from the `ActiveSupport::HashWithIndifferentAccess` one would break the ancestors chain, that's the best option we have here. | ||||
* | Make HWIA#compact not return nil when no nils | Pavel Pravosud | 2017-02-23 | 1 | -0/+10 |
| | |||||
* | Revert "Merge pull request #27925 from robin850/hwia-removal" | Kasper Timm Hansen | 2017-02-20 | 1 | -23/+0 |
| | | | | | | | | | Pointed out by @matthewd that the HWIA subclass changes the AS scoped class and top-level HWIA hierarchies out from under existing classes. This reverts commit 71da39097b67114329be6d8db7fe6911124531af, reversing changes made to 41c33bd4b2ec3f4a482e6030b6fda15091d81e4a. | ||||
* | Deprecate the top-level `HashWithIndifferentAccess` contant | Robin Dupret | 2017-02-19 | 1 | -0/+23 |
| | | | | | | | | | This constant was kept for the sake of backward compatibility; it is still available under `ActiveSupport::HashWithIndifferentAccess`. Furthermore, since Ruby 2.5 (https://bugs.ruby-lang.org/issues/11547) won't support top level constant lookup, people would have to update their code anyway. | ||||
* | ensure `#compact` of HWIDA to return HWIDA | yuuji.yaginuma | 2017-01-06 | 1 | -0/+10 |
| | | | | | | | | `Hash#compact` of Ruby native returns new hash. Therefore, in order to return HWIDA as in the past version, need to define own `#compact` to HWIDA. Related: #26868 | ||||
* | Fix Rubocop violations and fix documentation visibility | Rafael Mendonça França | 2016-12-28 | 1 | -1/+1 |
| | | | | | | Some methods were added to public API in 5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of the public API. | ||||
* | assert_equal takes expectation first | Akira Matsuda | 2016-12-26 | 1 | -21/+21 |
| | |||||
* | "Use assert_nil if expecting nil from ...:in `...'. This will fail in ↵ | Akira Matsuda | 2016-12-25 | 1 | -2/+2 |
| | | | | minitest 6." | ||||
* | Expectation first | Akira Matsuda | 2016-12-25 | 1 | -4/+4 |
| | |||||
* | "Use assert_nil if expecting nil from ...:in `...'. This will fail in MT6." | Akira Matsuda | 2016-12-25 | 1 | -1/+1 |
| | |||||
* | "Use assert_nil if expecting nil. This will fail in minitest 6." | Akira Matsuda | 2016-12-25 | 1 | -6/+6 |
| | |||||
* | Remove deprecated new_from_hash_copying_default | Andrew White | 2016-11-13 | 1 | -7/+0 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -12/+12 |
| | |||||
* | improve error message when include assertions fail | Michael Grosser | 2016-09-16 | 1 | -34/+34 |
| | | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong | ||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 1 | -64/+64 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty lines | Ryuta Kamizono | 2016-08-07 | 1 | -1/+0 |
| | |||||
* | remove redundant curlies from hash arguments | Xavier Noria | 2016-08-06 | 1 | -11/+11 |
| | |||||
* | modernizes hash syntax in activesupport | Xavier Noria | 2016-08-06 | 1 | -143/+143 |
| | |||||
* | applies new string literal convention in activesupport/test | Xavier Noria | 2016-08-06 | 1 | -150/+150 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | existant => existent | Abhishek Jain | 2016-06-09 | 1 | -1/+1 |
| | |||||
* | Improve Hash#compact! documentation and tests | Igor Pstyga | 2016-06-03 | 1 | -0/+8 |
| | | | | | | | Make it clear what should be returned when no changes were made to the hash. { c: true }.compact! # => nil | ||||
* | Support for unified Integer class in Ruby 2.4+ | Jeremy Daer | 2016-05-18 | 1 | -17/+17 |
| | | | | | | | | Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005 * Forward compat with new unified Integer class in Ruby 2.4+. * Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3. * Drops needless Fixnum distinction in docs, preferring Integer. | ||||
* | Fix regression in `Hash#dig` for HashWithIndifferentAccess. | Jon Moss | 2016-02-01 | 1 | -0/+6 |
| | |||||
* | Match HashWithIndifferentAccess#default's behaviour with Hash#default | David Cornu | 2016-01-07 | 1 | -2/+2 |
| | |||||
* | :scissors: | Rafael Mendonça França | 2015-10-30 | 1 | -1/+0 |
| | |||||
* | Deprecate `HWIDA.new_from_hash_copying_default` | Sean Griffin | 2015-10-29 | 1 | -1/+1 |
| | | | | This method was already niche, and is now redundant with `.new` | ||||
* | Merge pull request #16357 from gchan/hwia-respects-to-hash-default | Sean Griffin | 2015-10-29 | 1 | -0/+18 |
|\ | | | | | | | | | `HashWithIndifferentAccess.new` respects the default value or proc on objects that respond to `#to_hash` | ||||
| * | `HashWithIndifferentAccess.new` respects the default value or proc on ↵ | Gordon Chan | 2014-07-31 | 1 | -0/+18 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | objects that respond to `#to_hash`. Builds on the work of #12550 where `.new` will convert the object (that respond to `#to_hash`) to a hash and add that hash's keys and values to itself. This change will also make `.new` respect the default value or proc of objects that respond to `#to_hash`. In other words, this `.new` behaves exactly like `.new_from_hash_copying_default`. `.new_from_hash_copying_default` now simply invokes `.new` and any references to `.new_from_hash_copying_default` are replaced with `.new`. Added tests confirm behavior. | ||||
* | | ActiveSupport::HashWithIndifferentAccess select and reject should return ↵ | Bernard Potocki | 2015-07-17 | 1 | -0/+10 |
| | | | | | | | | enumerator if called without block | ||||
* | | Reuse the same test for HWIA reverse_merge! | Rafael Mendonça França | 2015-07-10 | 1 | -3/+1 |
| | | |||||
* | | Merge pull request #20828 from Sirupsen/hash-indifferent-dup-default-proc | Rafael Mendonça França | 2015-07-10 | 1 | -0/+37 |
|\ \ | | | | | | | active_support/indifferent_access: fix not raising when default_proc does | ||||
| * | | test/hash: move lonely indifferent hash test | Simon Eskildsen | 2015-07-10 | 1 | -0/+6 |
| | | | |||||
| * | | active_support/indifferent_hash: dont raise on to_hash when default_proc raises | Simon Eskildsen | 2015-07-10 | 1 | -0/+14 |
| | | | |||||
| * | | active_support/indifferent_hash: fix cloning default_proc on dup | Simon Eskildsen | 2015-07-10 | 1 | -0/+17 |
| | | | |||||
* | | | Removed use of mocha in active_support | Ronak Jangir | 2015-07-10 | 1 | -3/+4 |
|/ / | |||||
* | | - Moved hwia frozen value assignment test to hash_ext_test similar to other ↵ | Vipul A M | 2015-01-17 | 1 | -0/+8 |
| | | | | | | | | | | | | | | tests - Fixed the wrong use of with_indifferent_access on hash in the test which failed for isolated tests - Renamed to appropriately specify what the test does | ||||
* | | Pass symbol as an argument instead of a block | Erik Michaels-Ober | 2014-11-29 | 1 | -1/+1 |
| | | |||||
* | | Add tests to ensure default proc is used when `HashWithIndifferentAccess' is ↵ | Gordon Chan | 2014-07-31 | 1 | -0/+12 |
|/ | | | | initialized with a block | ||||
* | Make HWIA copy the default proc too. | Arthur Neves | 2014-07-24 | 1 | -0/+11 |
| | | | | [fixes #16279] | ||||
* | missing activesupport test coverage | Eugene Gilburg | 2014-07-19 | 1 | -1/+11 |
| | |||||
* | Add test cases for Hash#asset_valid_keys | Aditya Kapoor | 2014-06-14 | 1 | -0/+15 |
| |