Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Tidy up previous commit, fix message assertion and improve tests | Carlos Antonio da Silva | 2013-12-03 | 1 | -1/+6 |
| | |||||
* | Modify the Hash#assert_valid_keys error message so that it shows the valid ↵ | Nerian | 2013-12-03 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | keys. Also, show the wrong value as it was entered. { :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ]) => ArgumentError: Unknown key: failore { 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ]) => ArgumentError: Unknown key: failore { 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ]) => ArgumentError: Unknown key: "failore". Valid keys are: :failure, :funny { :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ]) => ArgumentError: Unknown key: :failore. Valid keys are: :failure, :funny Conflicts: activerecord/CHANGELOG.md Closes #11624. | ||||
* | slice! should not remove default hash value/proc | Antonio Santos | 2013-10-24 | 1 | -0/+18 |
| | |||||
* | Make HashWithIndifferentAccess#select always return the hash. | Marc Schütz | 2013-07-06 | 1 | -0/+6 |
| | | | | | Hash#select! returns nil if the hash didn't change and thus behaves differently from select, so it's return value can't be used as result for the latter. | ||||
* | Remove deprecated Hash#diff with no replacement. | Carlos Antonio da Silva | 2013-07-02 | 1 | -6/+0 |
| | | | | | If you're using it to compare hashes for the purpose of testing, please use MiniTest's assert_equal instead. | ||||
* | Merge pull request #10740 from mrsimo/hash-with-indifferent-access-select | Rafael Mendonça França | 2013-06-14 | 1 | -0/+30 |
|\ | | | | | HashWithIndifferentAccess#select working as intended | ||||
| * | HashWithIndifferentAccess#select working as intended | Albert Llop | 2013-05-23 | 1 | -0/+30 |
| | | | | | | | | | | | | Before this commit, #reject returned a HashWithIndifferentAccess, whereas #select returned a Hash. Now #select also returns a HashWithIndifferentAccess. | ||||
* | | Prevent side effects in `Hash#with_indifferent_access`. | Yves Senn | 2013-05-29 | 1 | -0/+7 |
|/ | |||||
* | Fix HWIA#to_hash behavior with array of hashes. | kennyj | 2013-05-16 | 1 | -0/+5 |
| | |||||
* | fix HashWithIndifferentAccess#to_hash behaviour | Vipul A M | 2013-04-19 | 1 | -0/+4 |
| | |||||
* | CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml. | Jeremy Kemper | 2013-01-08 | 1 | -6/+22 |
| | |||||
* | Revert "Merge branch 'master-sec'" | Jeremy Kemper | 2013-01-08 | 1 | -22/+6 |
| | | | | | This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing changes made to f049016cd348627bf8db0d72382d7580bf802a79. | ||||
* | CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml. | Jeremy Kemper | 2013-01-08 | 1 | -6/+22 |
| | |||||
* | Namespace HashWithIndifferentAccess | Akira Matsuda | 2013-01-07 | 1 | -1/+1 |
| | |||||
* | Refactor Hash.from_xml. | Steve Klabnik + Katrina Owen | 2012-12-21 | 1 | -1/+1 |
| | | | | | | | | | | | | Three basic refactors in this PR: * We extracted the logic into a method object. We now don't define a tone of extraneous methods on Hash, even if they were private. * Extracted blocks of the case statement into methods that do the work. This makes the logic more clear. * Extracted complicated if clauses into their own query methods. They often have two or three terms, this makes it much easier to see what they _do_. We took care not to refactor too much as to not break anything, and put comments where we suspect tests are missing. We think ActiveSupport::XMLMini might be a good candidate to move to a plugin in the future. | ||||
* | Test Hash#diff deprecation, also prevent deprecation message in AS tests | Nikita Afanasenko | 2012-11-11 | 1 | -1/+3 |
| | |||||
* | Implement replace method so key? works correctly. | David Graham | 2012-10-26 | 1 | -0/+12 |
| | |||||
* | Revert "remove unnecessary object/conversions file" | Xavier Noria | 2012-10-16 | 1 | -0/+1 |
| | | | | | | | This file is used at least by Active Merchant, its existence is maybe not necessary but no big deal either. This reverts commit ae9b3d7cecd77b9ace38671b183e1a360bf632b6. | ||||
* | Merge pull request #7007 from Mik-die/hash_extract | Rafael Mendonça França | 2012-10-12 | 1 | -1/+25 |
|\ | | | | | make Hash#extract! more symmetric with Hash#slice | ||||
| * | add more testcases and doc about Hash#extract! | Mikhail Dieterle | 2012-10-08 | 1 | -2/+9 |
| | | |||||
| * | make Hash#extract! more symmetric with Hash#slice | Mikhail Dieterle | 2012-10-08 | 1 | -0/+17 |
| | | |||||
* | | let (array|hash)/conversions.rb load the extensions in ↵ | Xavier Noria | 2012-10-09 | 1 | -2/+0 |
| | | | | | | | | object/to_(param|query).rb | ||||
* | | adds a missing require | Xavier Noria | 2012-10-09 | 1 | -0/+1 |
| | | |||||
* | | adds missing require | Xavier Noria | 2012-10-09 | 1 | -0/+1 |
| | | |||||
* | | remove unnecessary object/conversions file | Nihad Abbasov | 2012-10-02 | 1 | -1/+0 |
|/ | |||||
* | Allow passing block to deep_merge and deep_merge! | Pranas Kiziela | 2012-09-13 | 1 | -0/+10 |
| | | | | | Hash#merge accepts block that you can use to customize how hash values are merged. This change makes merge and deep_merge compatible. | ||||
* | Fix AS tests due to builder change with nil values / empty strings | Carlos Antonio da Silva | 2012-09-07 | 1 | -2/+2 |
| | | | | | Check 0180e090ab6cbe66f7b521a0c03e278a0463accd for more reasoning about that. | ||||
* | Extend HashWithIndifferentAccess#update to take an optional block | Leo Cassarani | 2012-09-05 | 1 | -0/+23 |
| | | | | | | | | | | | | | When a block is passed into the method, it will be invoked for each duplicated key, with the key in question and the two values as arguments. The value for the duplicated key in the receiver will be set to the return value of the block. This behaviour matches Ruby's long-standing implementation of Hash#update and is intended to provide a more consistent interface. HashWithIndifferentAccess#merge is also affected by the change, as it uses #update internally. | ||||
* | Fix lookup on HashWithIndifferentAccess for array values. | Chris Zetter | 2012-06-18 | 1 | -0/+7 |
| | |||||
* | Add missing requires for deep_dup and hash ext test | Carlos Antonio da Silva | 2012-05-24 | 1 | -0/+1 |
| | |||||
* | Use deep_dup in the deep_transform_keys tests. | Rafael Mendonça França | 2012-05-24 | 1 | -20/+98 |
| | | | | | | | | Using only dup make some tests to not catch up an implementation error because the methods were changing the nested hashes. Related to: https://github.com/rails/rails/commit/541429fbe49b0671adb3842ab1818230d670ef9f#L1R96 | ||||
* | Add Hash#deep_transform_keys and Hash#deep_transform_keys! Also convert ↵ | Mark McSpadden | 2012-05-23 | 1 | -1/+16 |
| | | | | deep_*_keys to use deep_transform_keys. | ||||
* | Adding deep versions of stringify_keys and symbolize_keys (plain and bang) ↵ | Lucas Húngaro | 2012-05-23 | 1 | -0/+92 |
| | | | | for nested hashes | ||||
* | Add Hash#transform_keys and Hash#transform_keys! and refactor *_keys methods ↵ | Mark McSpadden | 2012-05-23 | 1 | -0/+15 |
| | | | | to use them. | ||||
* | changed xml type datetime to dateTime, fixes #6328 | Angelo capilleri | 2012-05-23 | 1 | -2/+2 |
| | | | | | | | | | XmlMini define the xml 'datatime', but according to http://www.w3.org/TR/xmlschema-2/#dateTime could be better change this to 'dateTime' with upper case letter 'T. So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime' add the changing to the changelog | ||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-05-12 | 1 | -2/+2 |
|\ | | | | | | | | | Conflicts: activesupport/lib/active_support/callbacks.rb | ||||
| * | Fix copypaste. [ci skip] | Edward Tsech | 2012-05-11 | 1 | -2/+2 |
| | | |||||
* | | Test Hash#except can receive more than one argument. | Edward Tsech | 2012-05-11 | 1 | -0/+6 |
|/ | |||||
* | Nice logic for deep_dup in rails | Alexey Gaziev | 2012-05-06 | 1 | -15/+0 |
| | |||||
* | fix HashWithIndifferentAccess.[] method | Sergey Nartimov | 2012-03-23 | 1 | -0/+9 |
| | |||||
* | Remove warning of unused variable | Rafael Mendonça França | 2012-03-08 | 1 | -1/+1 |
| | |||||
* | refactor Hash#slice and Hash#extract! | Vasiliy Ermolovich | 2012-03-06 | 1 | -0/+7 |
| | |||||
* | remove usages of AS::OrderedHash | Vishnu Atrai | 2012-03-03 | 1 | -1/+1 |
| | |||||
* | use AS::TestCase as the base class | Aaron Patterson | 2012-01-05 | 1 | -3/+3 |
| | |||||
* | Initial pass at removing dead 1.8.x code from Active Support. | José Valim | 2011-12-20 | 1 | -5/+1 |
| | | | | | | There are a bunch of other implicit branches that adds 1.8.x specific code that still needs to be removed. Pull requests for those cases are welcome. | ||||
* | Overrode Hash#nested_under_indifferent_access in HashWithIndifferentAccess | Miles Georgi | 2011-12-11 | 1 | -0/+3 |
| | | | | to return self. | ||||
* | Fix test to reflect use of to_param for keys | brainopia | 2011-09-18 | 1 | -8/+8 |
| | |||||
* | Issue #636 - Parsing an xml file with multiple records and extra attributes ↵ | Sidu Ponnappa | 2011-07-11 | 1 | -0/+49 |
| | | | | (besides type) fails | ||||
* | Test that HWIA.with_indifferent_access does not return self | David Lee | 2011-05-17 | 1 | -0/+1 |
| | |||||
* | Use dup to preserve previous behavior | David Lee | 2011-05-17 | 1 | -1/+1 |
| |